PageSourceSearch

https://www.gardnermarsh.com/static/version1790234975/frontend/Cod…/js/epicor/common/ie-message.js

js gardnermarsh.com collected 2026-10-05 18:40:56 UTC 3,030 bytes, 90 lines download raw bytes

1/**
2 * Copyright © 2010-2022 Epicor Software Corporation: All Rights Reserved
3 */
4
5function msieversion()
6{
7    var ua = window.navigator.userAgent;
8    var msie = ua.indexOf("MSIE ");
9    if (msie > 0) {
10        return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)));
11    }
12    else {
13        return false;
14    }
15}
16
17if (msieversion()) {
18    function hasClass(el, className)
19    {
20        if (el.classList)
21            return el.classList.contains(className);
22        return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)'));
23    }
24
25    function addClass(el, className)
26    {
27        if (el.classList)
28            el.classList.add(className)
29        else if (!hasClass(el, className))
30            el.className += " " + className;
31    }
32
33    function removeClass(el, className)
34    {
35        if (el.classList)
36            el.classList.remove(className)
37        else if (hasClass(el, className))
38        {
39            var reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
40            el.className = el.className.replace(reg, ' ');
41        }
42    }
43
44    function setCookie (name,value,expires,path,theDomain,secure) {
45        value = escape(value);
46        var theCookie = name + "=" + value +
47            ((expires)    ? "; expires=" + expires.toGMTString() : "") +
48            ((path)       ? "; path="    + path   : "") +
49            ((theDomain)  ? "; domain="  + theDomain : "") +
50            ((secure)     ? "; secure"            : "");
51        document.cookie = theCookie;
52    }
53
54    function getCookie(Name) {
55        var search = Name + "="
56        if (document.cookie.length > 0) { // if there are any cookies
57            var offset = document.cookie.indexOf(search)
58            if (offset != -1) { // if cookie exists
59                offset += search.length
60                // set index of beginning of value
61                var end = document.cookie.indexOf(";", offset)
62                // set index of end of cookie value
63                if (end == -1) end = document.cookie.length
64                return unescape(document.cookie.substring(offset, end))
65            }
66        }
67    }
68
69    function delCookie(name,path,domain) {
70        if (getCookie(name)) document.cookie = name + "=" +
71            ((path)   ? ";path="   + path   : "") +
72            ((domain) ? ";domain=" + domain : "") +
73            ";expires=Thu, 01-Jan-70 00:00:01 GMT";
74    }
75    window.onload = function() {
76
77        var ieMessageEl = document.getElementById("ie-message-alert");
78        if (typeof getCookie('ecc-ie-message-alert')  === 'undefined') {
79            removeClass(ieMessageEl, 'ie-message-alert-hide');
80        }
81
82        document.getElementById("ieMsgCloseBtn").onclick = function fun() {
83            addClass(ieMessageEl, 'ie-message-alert-hide');
84            var cookieToday = new Date();
85            var cookieHours = 1;
86            var expiryDate = new Date(cookieToday.getTime() + (cookieHours * 3600000));
87            setCookie("ecc-ie-message-alert", "true", expiryDate, "/");
88        }
89    }
90}

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.