PageSourceSearch

https://www.fepbrochures-bcbsa.com/assets/custom-scripts/portal/v2/portallink.js?v=TTYJ7gUGy0OuT7tCrG0v0Q2

js fepbrochures-bcbsa.com collected 2026-10-08 08:22:20 UTC 3,929 bytes, 101 lines download raw bytes

1function PortalLink(container, data) {
2    var self = this;
3    self.totalColumnCount = 3;
4
5    this.init = function () {
6        self.treeDict = {};
7        self.properties = window["link_" + $(container).data("id")];
8        this.populateTreeDict(data[0]);
9        self.createShell(container);
10    }
11
12    this.populateTreeDict = function (node, parent, sibling) {
13        if (!node) return;
14        node.parent = parent;
15        node.sibling = sibling;
16        self.treeDict[node.id] = node;
17        for (var i = 0; i < node.items.length; i++) {
18            var nextSibling = null;
19            if (node.items.length > i + 1) {
20                nextSibling = node.items[i + 1];
21            }
22            self.populateTreeDict(node.items[i], node, nextSibling);
23        }
24    }
25   
26
27    this.createShell = function (container) {
28        var item = '<div class="row no-margin"><div class="box-holder">';
29        var pageName = "";
30        var pageUrl = $.trim(self.properties.pagelink_url);
31        var pageId = "";
32        
33        if ($.trim(self.properties.link_target) === "" || !(self.properties.link_target === "_blank" || self.properties.link_target === "_self")) {
34            self.properties.link_target = "_self";
35        }
36
37        var isDocument = false;
38        if (!pageUrl.startsWith("#LINKPAGE_") && !pageUrl.startsWith("#DOCPAGE_")) {
39            if ($.trim(self.properties.pagelink_url_id).startsWith("#DOCPAGE_")) {
40                isDocument = true;
41            }
42            pageId = $.trim(self.properties.pagelink_url_id).replace("#LINKPAGE_", "");
43            pageId = pageId.replace("#DOCPAGE_", "");
44        } else {
45            pageId = pageUrl.replace("#LINKPAGE_", "");
46            pageId = pageId.replace("#DOCPAGE_", "");
47        }
48        if ($.trim(pageId) !== "") {
49            if (!isDocument) {
50                var node = self.treeDict[pageId];
51                if (node) {
52                    if ($.trim(self.properties.pagelink_url_text) !== "") {
53                        pageName = $.trim(self.properties.pagelink_url_text);
54                    } else {
55                        pageName = node.name;
56                    }
57                    pageUrl = node.url;
58                }
59            }
60            else {
61               pageName = $.trim(self.properties.pagelink_url_text);
62            }
63        } else {
64            if ($.trim(self.properties.pagelink_url_text) !== "" &&
65                $.trim(self.properties.pagelink_url) !== "") {
66                pageName = $.trim(self.properties.pagelink_url_text);
67                pageUrl = $.trim(self.properties.pagelink_url);
68            }
69        }
70
71        if ($.trim(pageName) === "") {
72            if (!self.properties.in_designer && self.properties.sitemap_exists) {
73                $(container).remove();
74                return;
75            } else {
76                pageName = "Link Text (Link not set)";
77                pageUrl = "#";
78            }
79        }
80
81        item += '<div class="row no-margin no-padding"><div class="site-page-link site-page-link-widget-container">';
82            item += '<a role="link" aria-label="Navigate to: ' + $.trim(escapeHTML(pageName)) + '"  href="' + pageUrl + '" style="display: block; text-align:' + self.properties.alignment + ';' + self.properties.text_font + ';" target="' + self.properties.link_target + '">';
83            item += $.trim(pageName);
84            item += '</a>';
85            item += '</div></div>';
86        item += '</div></div>';
87        $(container).html("");
88        $(container).append(item);
89        self.shell = item;
90    }
91}
92
93function escapeHTML(value) {
94    if ($.trim(value) !== "") {
95        var text = document.createTextNode(value);
96        var p = document.createElement('p');
97        p.appendChild(text);
98        return p.innerHTML;
99    }
100    return value;
101};

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.