PageSourceSearch

https://blackplaguebrewing.com/assets/e884d167_itro-scripts.js

js blackplaguebrewing.com collected 2026-10-09 22:17:29 UTC 6,209 bytes, 216 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opener = _____WB$wombat$assign$function_____("opener");
10/*
11 This file is part of ITRO Popup Plugin. (email : [email protected])
12 */
13
14/* init variables */
15var itro_is_preview;
16var itro_cookie_expiration;
17var itro_age_restriction;
18
19/**
20 * Manage popup appearing
21 * 
22 *
23 * @since 1.0
24 *
25 */
26function itro_enter_anim(auto_margin)
27{
28    if (document.cookie.indexOf("popup_cookie") == -1 || itro_is_preview === true)
29    {
30	//align the popup before fadein
31	if (auto_margin == 'yes') {
32	    itro_margin_refresh(50);
33	}
34
35	jQuery("#itro_popup").css('display', 'none');
36	jQuery("#itro_popup").css('opacity', 1);
37	jQuery("#itro_popup").css('visibility', 'visible');
38
39	jQuery("#itro_opaco").fadeIn(function ()
40	{
41	    jQuery("#itro_popup").fadeIn();
42	    if (itro_age_restriction === false)
43	    {
44		itro_set_cookie("popup_cookie", "one_time_popup", itro_cookie_expiration);
45	    }
46	    // refresh every 0.5 second the popup top margin (needed for browser window resizeing)
47	    if (auto_margin == 'yes') {
48		setInterval(function () {
49		    itro_margin_refresh();
50		}, 500);
51	    }
52	});
53    } else {
54	jQuery("#itro_popup").css('display', 'none');
55    }
56
57}
58
59/**
60 * Manage popup closing
61 * 
62 *
63 * @since 1.0
64 *
65 */
66function itro_exit_anim() {
67    jQuery('#itro_popup').fadeOut(function () {
68	jQuery('#popup_content').remove();
69	jQuery('#itro_opaco').fadeOut();
70    });
71}
72
73
74/**
75 * Center the popup vertically
76 * 
77 * @param {int} speed : the milesec speed fo the alignment animation
78 *
79 * @since 1.0
80 *
81 */
82function itro_margin_refresh(speed) {
83    if (typeof (speed) == undefined) {
84	speed = 200;
85    }
86
87    if (typeof (window.innerWidth) == 'number')
88    {
89	/* Non-IE */
90	browserWidth = window.innerWidth;
91	browserHeight = window.innerHeight;
92    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
93    {
94	/* IE 6+ in 'standards compliant mode' */
95	browserWidth = document.documentElement.clientWidth;
96	browserHeight = document.documentElement.clientHeight;
97    } else if (document.body && (document.body.clientWidth || document.body.clientHeight))
98    {
99	/* IE 4 compatible */
100	browserWidth = document.body.clientWidth;
101	browserHeight = document.body.clientHeight;
102    }
103    popupHeight = document.getElementById('itro_popup').offsetHeight;	//get the px size of popup div
104    parentOffset = jQuery('#itro_popup').position().top;
105    docOffset = jQuery('#itro_popup').offset().top;
106
107    desTopWindowMargin = Math.round((browserHeight - popupHeight) / 2); 		//desired top margin of popup (window related)
108    desTopWindowMargin = desTopWindowMargin < 0 ? 0 : desTopWindowMargin; 	//avoid that negative top position will hide the popup 
109    popupTopMargin = desTopWindowMargin - docOffset + parentOffset;
110
111    if (jQuery('#itro_popup').css('position') == 'absolute') {
112	//set a tollerance to avoid flickering
113	if (Math.abs(popupTopMargin - parentOffset) > 2) {
114	    jQuery('#itro_popup').animate({top: popupTopMargin}, speed);
115	}
116    } else {
117	if (Math.abs(popupTopMargin - parentOffset) > 2) {
118	    jQuery('#itro_popup').animate({top: desTopWindowMargin}, speed);
119	}
120    }
121
122}
123
124/**
125 * Invert an hex color with the # char
126 * 
127 * @param string hexTripletColor: the hex string
128 *
129 * @since 4.9
130 *
131 */
132function itro_invert_color(hexTripletColor) {
133    var color = hexTripletColor;
134    color = color.substring(1);           // remove #
135    color = parseInt(color, 16);          // convert to integer
136    color = 0xFFFFFF ^ color;             // invert three bytes
137    color = color.toString(16);           // convert to hex
138    color = "#" + color;                  // prepend #
139    return color;
140}
141
142/**
143 * Convert an rgb string like rgb(255, 255, 255) to an hex code
144 * 
145 * @param string rgbString: the rgb string
146 *
147 * @since 4.9
148 *
149 */
150function itro_rgb2hex(rgbString) {
151    var parts = rgbString.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
152    delete (parts[0]);
153    for (var i = 1; i <= 3; ++i) {
154	parts[i] = parseInt(parts[i]).toString(16);
155	if (parts[i].length == 1)
156	    parts[i] = '0' + parts[i];
157    }
158    return '#' + parts.join('').toUpperCase();
159}
160
161/* function for countdown to show popup when the delay is set */
162function popup_delay(auto_margin) {
163    delay--;
164    if (delay <= 0)
165    {
166	clearInterval(interval_id_delay);
167	itro_enter_anim(auto_margin);
168    }
169}
170
171
172/**
173 * Countdown for automatic closing
174 *
175 * @since 1.0
176 *
177 */
178function popTimer() {
179    if (popTime > 0) {
180	document.getElementById("timer").innerHTML = popTime;
181	popTime--;
182    } else {
183	clearInterval(interval_id);
184	itro_exit_anim();
185    }
186}
187
188/* function use to set the cookie for next visualization time */
189function itro_set_cookie(c_name, value, exhours) {
190    var exdate = new Date();
191    exdate.setTime(exdate.getTime() + (exhours * 3600 * 1000));
192    var c_value = escape(value) + ((exhours == null) ? "" : "; expires=" + exdate.toUTCString());
193    document.cookie = c_name + "=" + c_value + "; path=/";
194}
195}
196
197/*
198     FILE ARCHIVED ON 21:21:47 Sep 05, 2022 AND RETRIEVED FROM THE
199     INTERNET ARCHIVE ON 01:38:06 Jul 16, 2026.
200     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
201
202     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
203     SECTION 108(a)(3)).
204*/
205/*
206playback timings (ms):
207  captures_list: 0.577
208  exclusion.robots: 0.067
209  exclusion.robots.policy: 0.056
210  esindex: 0.008
211  cdx.remote: 6.643
212  LoadShardBlock: 78.334 (3)
213  PetaboxLoader3.datanode: 52.671 (4)
214  PetaboxLoader3.resolve: 55.623 (2)
215  load_resource: 34.945
216*/

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.