PageSourceSearch

https://www.caasco.com/scripts/footer-store-locator.js?v=637913678480000000

js caasco.com collected 2026-09-25 20:51:48 UTC 3,417 bytes, 79 lines download raw bytes

1
2            if (!(window.google === 'undefined' || window.google === null) && document.getElementById('search-store') != null) {
3                var autocomplete = new google.maps.places.Autocomplete((document.getElementById('search-store')));
4            }
5                
6
7            jQuery("#searchStoreBtn").click(function () {
8                var location = jQuery("#search-store").val();
9                if (location !== "") {
10                    var url = jQuery("#storeLocation").val();
11                    var updatedUrl = url + "?location=" + location;
12                    window.location.href = updatedUrl;
13                }
14            });
15            function getParameterValue(searchedParameter) {
16                var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
17                for (var i = 0; i < url.length; i++) {
18                    var parameter = url[i].split('=');
19                    if (parameter[0] == searchedParameter) {
20                        return decodeURIComponent(parameter[1]);
21                    }
22                }
23            };
24
25            var locationParameter = getParameterValue("location");
26            var event = null;
27
28            if (!detectIE()) {
29                event = new MouseEvent("click", { "view": window });
30            }
31            else {
32                (function () {
33                    if (typeof window.CustomEvent === "function") return false;
34                    function CustomEvent(event, params) {
35                        params = params || { bubbles: false, cancelable: false, detail: undefined };
36                        var evt = document.createEvent('CustomEvent');
37                        evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
38                        return evt;
39                    }
40                    CustomEvent.prototype = window.Event.prototype;
41                    window.CustomEvent = CustomEvent;
42                })();
43
44                event = new CustomEvent("click", {
45                    "view": window
46                });
47            }
48
49            var btn = document.getElementById("searchButton");
50            if (locationParameter !== undefined) {
51                jQuery("#postal-search").val(locationParameter);
52                setTimeout(function () { btn.dispatchEvent(event); }, 250);
53            }
54
55            function detectIE() {
56                var ua = window.navigator.userAgent;
57
58                var msie = ua.indexOf('MSIE ');
59                if (msie > 0) {
60                    // IE 10 or older => return version number
61                    return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
62                }
63
64                var trident = ua.indexOf('Trident/');
65                if (trident > 0) {
66                    // IE 11 => return version number
67                    var rv = ua.indexOf('rv:');
68                    return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
69                }
70
71                var edge = ua.indexOf('Edge/');
72                if (edge > 0) {
73                    // Edge (IE 12+) => return version number
74                    return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
75                }
76
77                // other browser
78                return false;
79            }

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.