PageSourceSearch

https://www.micuccigrocery.com/_dm/s/rt/smart/popup.js

js micuccigrocery.com collected 2026-09-26 20:49:56 UTC 1,805 bytes, 47 lines download raw bytes

1(function(global) {
2  global.insiteScripts = global.insiteScripts || {};
3  global.insiteScripts.popup = global.insiteScripts.popup || function message(scriptOptions) {
4    var dmSmartScriptDuration = scriptOptions.duration,
5    	  dmSmartScriptSettings = scriptOptions.settings,
6    	  dmSmartScriptRuleId = scriptOptions.ruleId,
7          dmSmartScriptRuleType = scriptOptions.ruleType,
8
9        isForced = scriptOptions.isForced;      
10
11    var getCookieName = function(popupName) {
12      return '_dm_showed_' + popupName;
13    };
14
15    var shouldShowPopup = function(popupName) {
16       return isForced || $.getCookie(getCookieName(popupName)) === null;
17    };
18
19    // If insite configured to show a popup then we don't want to show it everytime, once every "popup.insite.cookie.ttl" hours.
20    var onClosePopup = function(popupName, event) {
21      if (!isForced)
22        $.setCookie(getCookieName(popupName), true, rtCommonProps["popup.insite.cookie.ttl"]);
23    };
24
25    (function() {
26    	
27      var settings = JSON.parse(atob(dmSmartScriptSettings));
28      var popupName = settings.popupName;
29      var delay = settings.delay;
30      
31      var options = {
32        'onClose' : onClosePopup.bind(null, popupName),
33        'additionalAttributes': [{name:'data-rule', value:dmSmartScriptRuleId}, {name:'data-rule-type', value:dmSmartScriptRuleType}]
34      };
35
36      if (popupName && shouldShowPopup(popupName)) {
37    	  setTimeout(function() {
38          $.dmrt.onLoad($.dmrt.components.popupService.displayPopup.bind(null, popupName, options));
39            if (window.dmsnowplow) {
40               dmsnowplow('trackStructEvent', 'insite', 'impression', scriptOptions.ruleType, scriptOptions.ruleId);
41            }
42          }, (delay + dmSmartScriptDuration) * 1000);
43
44      }      
45    })();
46  };
47})(this);

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.