PageSourceSearch

https://www.sirgroutcharleston.com/js/popup-main.js

js sirgroutcharleston.com collected 2026-10-04 21:32:20 UTC 2,901 bytes, 75 lines download raw bytes

1var strCokiefirstValue;
2var strCookieCloseValue;
3var strDefaultCookieValue;
4
5function fnSetCookie(strCookieName, strCookieValue, strCookiePath, intCookieExp) {
6	intCookieExp = intCookieExp || null;
7	strCookiePath = strCookiePath || null;
8	if (intCookieExp != null && strCookiePath != null) {
9		var strDate = new Date();
10		strDate.setTime(strDate.getTime() + (intCookieExp * 24 * 60 * 60 * 1000));
11		var strDateExpires = "expires=" + strDate.toUTCString();
12		document.cookie = strCookieName + "=" + strCookieValue + "; " + strDateExpires + "; " + "path=" + strCookiePath;
13	} else if (strCookiePath != null && intCookieExp == null) {
14		document.cookie = strCookieName + "=" + strCookieValue + "; " + "path=" + strCookiePath;
15	} else {
16		document.cookie = strCookieName + "=" + strCookieValue;
17	}
18}
19
20function fnGetCookie(strNameGetCookie) {
21	var strNameCookie = strNameGetCookie + "=";
22	var arrCookiesAcitve = document.cookie.split(';');
23	for (var i = 0; i < arrCookiesAcitve.length; i++) {
24		var arrCookieValues = $.trim(arrCookiesAcitve[i]).split("=");
25		if (arrCookieValues[0] == strNameGetCookie) {
26			return arrCookieValues[1];
27		}
28	}
29	return false;
30}
31function FnPopupPromotionStepOne(intTimeToShow, intTimeToScroll) {
32    var strCookieOpenValue = fnGetCookie("PopupPromotionStep1Open");
33    var strCookieCloseValue = fnGetCookie("PopupPromotionStep1Close");
34    var strDefaultCookieValue = fnGetCookie("UserRegistered");
35
36    function showPopup() {
37        $('.popup').animate({ bottom: "-11px" }, 3000);
38        fnSetCookie("PopupPromotionStep1Open", "true", "/", 7);
39    }
40    if (strCookieOpenValue == false && strCookieCloseValue == false && strDefaultCookieValue == false) {
41        // Mostrar el popup después de intTimeToShow milisegundos
42        setTimeout(showPopup, intTimeToShow);
43        // Mostrar el popup después de intTimeToScroll milisegundos si el usuario hace scroll
44        var hasScrolled = false;
45        $(window).scroll(function () {
46            if (!hasScrolled) {
47                setTimeout(showPopup, intTimeToScroll);
48                hasScrolled = true;
49            }
50        });
51    } else if (strCookieOpenValue == "true" && strCookieCloseValue == false && strDefaultCookieValue == false) {
52        setTimeout(showPopup, intTimeToShow);
53    }
54
55    $('.popup .close').click(function (e) {
56        $('.popup').css('display', 'none');
57        fnSetCookie("PopupPromotionStep1Close", "true", "/", 7);
58    });
59
60    $('#img-link').click(function (e) {
61        $('.popup').css('display', 'none');
62        fnSetCookie("PopupPromotionStep1Close", "true", "/", 7);
63    });
64}
65
66$(document).ready(function () {
67    if (window.fnSetCookieDefault) {
68        fnSetCookieDefault();
69    } 
70
71// Registrar el evento de scroll
72   $(window).scroll(function () {
73       FnPopupPromotionStepOne(5000, 3000);
74   });
75});

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.