PageSourceSearch

https://www.fidelity.com/bin-public/060_www_fidelity_com/js/lc-redesign/lc_learning_paths_anchor.js

js fidelity.com collected 2026-09-24 08:59:21 UTC 1,923 bytes, 46 lines download raw bytes

1lcAnchors = {
2    clearHTML: function (elem, callback) {
3        if (elem != null) {
4            elem.innerHTML = "";
5        }
6        callback();
7    },
8    populateHeaders: function (headers) {
9        if (lcAnchors.selectMenu != null) {
10            //populate select menu with static
11            lcAnchors.selectMenu.innerHTML = '<option selected="selected" value="">Please select a topic</option>';
12            for (var h = 0; h < headers.length; h++) {
13                //build new anchor tags
14                var lcAnchor = document.createElement('a');
15                var lcAnchorID = document.createAttribute('id');
16                var lcAnchorTitle = headers[h].parentNode.querySelector('h2');
17                var lcAnchorTitleText = lcAnchorTitle.innerHTML;
18
19                // populate anchors
20                var lcAnchorTitleProcessed = lcAnchorTitleText.replace(/\s+/g, '-').toLowerCase();
21                lcAnchorID.value = lcAnchorTitleProcessed;
22                lcAnchor.setAttributeNode(lcAnchorID);
23                lcAnchorTitle.parentNode.insertBefore(lcAnchor, lcAnchorTitle);
24
25                // build options in select menu
26                var lcOption = document.createElement('option');
27                var lcOptionValue = document.createAttribute('value');
28                var lcOptionValueText = '#' + lcAnchorTitleProcessed;
29
30                //populate select menu
31                lcOptionValue.value = lcOptionValueText;
32                lcOption.setAttributeNode(lcOptionValue);
33                lcOption.innerHTML = lcAnchorTitleText;
34                lcAnchors.selectMenu.appendChild(lcOption);
35            }
36        }
37    }
38}
39
40lcAnchors.headers = document.querySelectorAll('[id^="helios-tcm"]');
41
42lcAnchors.selectMenu = document.querySelector('.navigation-dropdown #state-selector');
43
44lcAnchors.clearHTML(lcAnchors.selectMenu, function () {
45    lcAnchors.populateHeaders(lcAnchors.headers);
46})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.