PageSourceSearch

https://www.monadnockperio.com/wp-content/themes/ekwa/js/custom.js?ver=1.0.0

js monadnockperio.com collected 2026-10-06 12:24:32 UTC 4,420 bytes, 128 lines download raw bytes

1function addTitleToExLink() {
2   $('a[target="_blank"]').each(function(){
3    $(this).attr({title: "Link opens in a new window"})
4    })
5}    
6
7    
8function insertScript(url) {
9    
10    function isScriptLoaded(url) {
11        var scripts = document.getElementsByTagName('script');
12        for (var i = scripts.length; i--;) {
13            if (scripts[i].src == url) return true;
14        }
15        return false;
16    }
17    
18    if (!isScriptLoaded(url)) {
19        var head = document.getElementsByTagName('head')[0];
20            var script = document.createElement('script');
21            script.type = 'text/javascript';
22            script.src = url;
23            head.appendChild(script);
24    }
25  
26}
27
28
29function insertStyles(file, id) {
30    var DynamicCss = document.getElementById(id);
31        if(!DynamicCss){
32          var cssFile = file;
33          var link = document.createElement( "link" );
34          link.href = cssFile;
35          link.id= id; 
36          link.type = "text/css";
37          link.rel = "stylesheet";
38          document.getElementsByTagName( "head" )[0].appendChild( link );
39        }
40}
41 
42 
43
44        
45    $(this).one('mousemove', function() {
46        console.log('test-move')
47        if (mobileDevice) {
48           insertStyles(TEMPDIR + '/plugins/fontawesome/css/all.min.css', 'fontAwesome');
49        }
50        insertScript('https://www.bots.ekwa.com/chatbox/10590/loader.js');
51        insertScript('https://assets.pinterest.com/js/pinit.js');
52        
53        insertScript('https://cdn.userway.org/widget.js?account=lpkp8KMSWk');
54        
55        addTitleToExLink();
56        
57    }).one('scroll', function(){
58    
59        console.log('test-scroll');
60        if (mobileDevice) {
61           insertStyles(TEMPDIR + '/plugins/fontawesome/css/all.min.css', 'fontAwesome');
62    
63                setTimeout(function() {
64                  $('.footer-icons, .scrollup').show();
65                }, 1000); 
66        }
67        insertScript('https://www.bots.ekwa.com/chatbox/10590/loader.js');
68        insertScript('https://assets.pinterest.com/js/pinit.js');
69
70        insertScript('https://cdn.userway.org/widget.js?account=lpkp8KMSWk');
71
72        addTitleToExLink();
73    }).one('touchstart', function(){
74    
75        console.log('test-touchstart');
76        if (mobileDevice) {
77           insertStyles(TEMPDIR + '/plugins/fontawesome/css/all.min.css', 'fontAwesome');
78    
79                setTimeout(function() {
80                  $('.footer-icons, .scrollup').show();
81                }, 1000); 
82        }
83        insertScript('https://www.bots.ekwa.com/chatbox/10590/loader.js');
84        insertScript('https://assets.pinterest.com/js/pinit.js');
85
86        insertScript('https://cdn.userway.org/widget.js?account=lpkp8KMSWk');
87
88        addTitleToExLink();
89    });
90
91
92   var scrollObject = {};
93   window.onscroll = getScrollPosition;
94   function getScrollPosition(){
95       scrollObject = {
96          x: window.pageXOffset,
97          y: window.pageYOffset
98       }
99       if(scrollObject.y > 250) {       
100         document.querySelector(".ekwa-theme-header").classList.add("fixed_header");
101      } else {
102          document.querySelector(".ekwa-theme-header").classList.remove("fixed_header");
103      }
104       if(scrollObject.y > 50) {       
105           document.querySelector(".mheader").classList.add("fixed_header");
106            
107       } else {
108            document.querySelector(".mheader").classList.remove("fixed_header");
109       }
110   }
111
112$(document).ready(function () {
113    var checkExist = setInterval(function () {
114        // Check if elements with 'social-media' and 'sm-icons' classes exist
115        if ($('.social-media .sm-icons[area-label]').length) {
116            console.log('Updating area-label to aria-label');
117            
118            // Loop through the elements and update the attribute
119            $('.social-media .sm-icons[area-label]').each(function () {
120                var areaLabelValue = $(this).attr('area-label'); // Get area-label value
121                $(this).attr('aria-label', areaLabelValue);       // Set aria-label value
122                $(this).removeAttr('area-label');                // Remove area-label
123            });
124
125            clearInterval(checkExist); // Stop checking once the update is complete
126        }
127    }, 100); // Check every 100ms
128});

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.