PageSourceSearch

https://www.pingdom.com/wp-content/plugins/solarwinds-announcement/assets/js/announcement.js

js pingdom.com collected 2026-09-24 06:23:16 UTC 4,359 bytes, 124 lines download raw bytes

1function showBottomBanner() {
2    /** Bottom Banner Cookie Functionality */
3    var bottomBanner = document.getElementById("announcementBottomBanner");
4
5    if (typeof(bottomBanner) != 'undefined' && bottomBanner != null) {
6        var bottomBannerTimeout = bottomBanner.getAttribute('data-timeout');
7        if (bottomBannerTimeout) {
8            setTimeout(function() {
9                var dismissLinkBottomBanner = bottomBanner.querySelector(".closeBottomBanner");
10                var cookies = document.cookie.split('; ');
11            
12                var cookieValue = cookies.find(function(row) {
13                    return row.startsWith('sw-bottom-banner-announcement');
14                });
15            
16                if ( cookieValue ) {
17                    bottomBanner.classList.remove("showBanner");
18                } else {
19                    bottomBanner.classList.add("showBanner")
20                }
21            
22                dismissLinkBottomBanner.addEventListener('click', function(e){
23                    bottomBanner.classList.remove('showBanner');
24                    document.cookie = "sw-bottom-banner-announcement";
25                });
26            }, bottomBannerTimeout);
27        }
28
29        return 'sw-bottom-banner-announcement';
30    } else {
31        return 'sw-bottom-banner-not-loaded';
32    }
33}
34
35function showFlyOut() {
36    /** Fly-out Cookie Functionality */
37    var flyout = document.getElementById("announcementFlyOut");
38
39    if (typeof(flyout) != 'undefined' && flyout != null) {
40        var flyoutTimeout = flyout.getAttribute('data-timeout');
41
42        if (flyoutTimeout) {
43            setTimeout(function() {
44                var dismissLinkFlyOut = flyout.querySelector(".closeFlyOut");
45                var cookies = document.cookie.split('; ');
46    
47                var cookieValue = cookies.find(function(row) {
48                    return row.startsWith('sw-flyout-announcement');
49                });
50    
51                if ( cookieValue ) {
52                    flyout.classList.add("hideFlyOut");
53                    flyout.classList.remove("showFlyOut");
54                } else {
55                    flyout.classList.remove("hideFlyOut");
56                    flyout.classList.add("showFlyOut");
57                }
58    
59                dismissLinkFlyOut.addEventListener('click', function(e){
60                    flyout.classList.add("hideFlyOut");
61                    document.cookie = "sw-flyout-announcement";
62                });
63            }, flyoutTimeout);
64        }
65    
66        return 'sw-fly-out-announcement';
67    } else {
68        return 'sw-fly-out-not-loaded';
69    }
70}
71
72function showPopUp() {
73    /** Popup Cookie Functionality */
74    var popup = document.getElementById("announcementPopup");
75
76    if (typeof(popup) != 'undefined' && popup != null) {
77        var popupTimeout = popup.getAttribute('data-timeout');
78
79        if (popupTimeout) {
80            setTimeout(function() {
81                var dismissLinkPopup = popup.querySelector(".closePopUp");
82                var cookies = document.cookie.split('; ');
83                var cookieValue = cookies.find(function(row) {
84                    return row.startsWith('sw-popup-announcement');
85                });
86    
87                if ( cookieValue ) {
88                    popup.classList.add("hidePopup");
89                    popup.classList.remove("showPopup");
90                } else {
91                    popup.classList.remove("hidePopup");
92                    popup.classList.add("showPopup");
93                }
94    
95                dismissLinkPopup.addEventListener('click', function(e){
96                    popup.className += ' hidePopup';
97                    document.cookie = "sw-popup-announcement";
98                });
99            }, popupTimeout);
100        }
101    
102        return 'sw-popup-announcement';
103    } else {
104        return 'sw-popup-not-loaded';
105    }
106}
107
108
109function ready(callback){
110    // in case the document is already rendered
111    if (document.readyState!='loading') callback();
112    // modern browsers
113    else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback);
114    // IE <= 8
115    else document.attachEvent('onreadystatechange', function(){
116        if (document.readyState=='complete') callback();
117    });
118}
119
120ready(function(){
121    showBottomBanner();
122    showFlyOut();
123    showPopUp();
124});

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.