PageSourceSearch

https://new-compass.net/sites/new-compass.net/themes/compasssky/statescope_pypo1x.js

js new-compass.net collected 2026-10-02 11:55:58 UTC 1,636 bytes, 58 lines download raw bytes

1document.enableStateScope = function(scope, on)
2		{
3		  var de = document.documentElement;
4		  if (on)
5			de.className += " " + scope;
6		  else
7			de.className = de.className.replace(
8			  new RegExp("\\b" + scope + "\\b"), "");
9		};
10		
11		(function()
12		{
13			var de = document.documentElement;
14			var img = new Image();
15			
16			// Handling for Gecko browsers
17			if (img.style.MozBinding != null)
18			{
19				img.style.backgroundImage = "url(" + document.location.protocol + "//0)";
20				var bg = window.getComputedStyle(img, '').backgroundImage;
21				
22				// When images are off, Firefox 2 and lower reports "none"
23				// Firefox 3 and higher reports "url(invalid-url:)"
24				// Also, always show images for local files in Firefox
25				if (bg != "none" && bg != "url(invalid-url:)" || document.URL.substr(0, 2) == "fi")
26				{
27					document.enableStateScope("images-on", true);
28				}
29			}
30			else
31			{
32				// Handling for Safari (including iPhone)
33				img.style.cssText = "-webkit-opacity:0";
34				if (img.style.webkitOpacity == 0)
35				{
36					img.onload = function()
37					{
38						// Only enable the state scope if the width
39						// of the image is greater than 0.
40						document.enableStateScope("images-on", img.width > 0);
41					}
42					// Source the image to a 43-byte 1x1 pixel GIF image encoded as a data URI.
43					img.src = 
44						"data:image/gif;base64," +
45						"R0lGODlhAQABAIAAAP///wAAACH5BAE" +
46						"AAAAALAAAAAABAAEAAAICRAEAOw==";
47				}
48				// Handling for everything else
49				else
50				{
51					img.onerror = function(e)
52					{
53						document.enableStateScope("images-on", true);
54					}
55					img.src = "about:blank";
56				}
57			}
58		} )();

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.