PageSourceSearch

https://www.processfolks.com/templates/rt_nuance/js/rokmediaqueries.js

js processfolks.com collected 2026-10-04 04:56:22 UTC 5,970 bytes, 189 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__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 opens = _____WB$wombat$assign$function_____("opens");
10/**
11* @version	$Id: rokmediaqueries.js 22659 2014-08-14 12:09:51Z arifin $
12* @author		RocketTheme http://www.rockettheme.com
13* @copyright Copyright (C) 2007 - 2014 RocketTheme, LLC
14* @license	http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
15*/
16
17((function(){
18///*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
19// matchMedia polyfill
20window.matchMedia = window.matchMedia || window.msMatchMedia || (function(doc, undefined){
21		var bool,
22			docElem = doc.documentElement,
23			refNode = docElem.firstElementChild || docElem.firstChild,
24			// fakeBody required for <FF4 when executed in <head>
25			fakeBody = doc.createElement('body'),
26			div = doc.createElement('div');
27
28		div.id = 'mq-test-1';
29		div.style.cssText = "position:absolute;top:-100em";
30		fakeBody.style.background = "none";
31		fakeBody.appendChild(div);
32
33		return function(q){
34			div.innerHTML = '&shy;<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>';
35
36			docElem.insertBefore(fakeBody, refNode);
37			bool = div.offsetWidth == 42;
38			docElem.removeChild(fakeBody);
39
40			return {
41				matches: bool,
42				media: q,
43				addListener: function(fn){
44					if (!Browser.ie9 && !window.opera) return "";
45
46					if (window.retrieve('rokmediaqueries:listener:' + q.replace(/[a-z]|[(|)|:|\s|-]/gi, ''), false)) return;
47
48					window.store('rokmediaqueries:listener:' + q.replace(/[a-z]|[(|)|:|\s|-]/gi, ''), true);
49					window[window.addListener ? 'addListener' : 'attachEvent']('resize', function(){
50						var sizes = {}, length = 0, winSize, passed = false;
51						q.replace(/(\w+-?\w+)\s?:\s?(\d+){1,}/g, function(match, p1, p2, p3, offset, string){
52							sizes[p1] = p2;
53							length++;
54						});
55						if (!length) return;
56						else if (length == 1){
57							winSize = window.getSize();
58							passed = false;
59							Object.each(sizes, function(size, dimension){
60								if (dimension == 'min-width') passed += winSize.x >= size;
61								else if (dimension == 'max-width') passed += winSize.x <= size;
62								else if (dimension == 'width') passed += winSize.x == size;
63							});
64						} else if (length > 1) {
65							winSize = window.getSize();
66							passed = true;
67							Object.each(sizes, function(size, dimension){
68								if (dimension == 'min-width') passed *= winSize.x >= size;
69								else if (dimension == 'max-width') passed *= winSize.x <= size;
70								else if (dimension == 'width') passed *= winSize.x == size;
71							});
72						}
73
74						if (passed) return fn.call(fn, q);
75					});
76
77				}
78			};
79		};
80
81	})(document);
82
83})());
84
85((function(win, doc){
86
87	if (typeof RokMediaQueries != 'undefined') return;
88
89	var RokMediaQuery = new Class({
90		Implements: [Events, Options],
91		options: {
92			/*
93				onChange: function(query){},
94			*/
95			queries: [
96				'(min-width: 1200px)',
97				'(min-width: 960px) and (max-width: 1199px)',
98				'(min-width: 768px) and (max-width: 959px)',
99				'(min-width: 481px) and (max-width: 767px)',
100				'(max-width: 480px)'
101			]
102		},
103		initialize: function(options){
104			this.setOptions(options);
105			this.queries = this.options.queries;
106			this.queriesEvents = {};
107			this.timers = [];
108
109			for (var i = this.queries.length - 1; i >= 0; i--) {
110				var media = win.matchMedia(this.queries[i]);
111				media.addListener(this._fireEvent.bind(this, this.queries[i]));
112				this.queriesEvents[this.queries[i]] = [];
113			}
114		},
115
116		on: function(query, funct){
117			if (query == 'every'){
118				for (var i = this.queries.length - 1; i >= 0; i--) this._addOnMatch(this.queries[i], funct);
119			} else {
120				this._addOnMatch(query, funct);
121			}
122		},
123
124		add: function(query){
125			if (!this.queries.contains(query)){
126				var media;
127				this.queries.push(query);
128				media = win.matchMedia(query);
129				media.addListener(this._fireEvent.bind(this, query));
130			}
131
132			if (!this.queriesEvents[query]) this.queriesEvents[query] = [];
133		},
134
135		getQuery: function(){
136			var current = "";
137
138			for (var i = this.queries.length - 1; i >= 0; i--) {
139				if (win.matchMedia(this.queries[i]).matches){
140					current = this.queries[i];
141					break;
142				}
143			}
144
145			return current;
146		},
147
148		/* private methods */
149		_fireEvent: function(query){
150			if (!win.matchMedia(query).matches || !Object.getLength(this.queriesEvents) || !this.queriesEvents[query]) return;
151
152			for (var i = this.queriesEvents[query].length - 1; i >= 0; i--) {
153				//this.queriesEvents[query][i].delay(5, this, query);
154				this.queriesEvents[query][i](query);
155			}
156		},
157
158		_addOnMatch: function(query, funct){
159			this.add(query);
160			this.queriesEvents[query].push(funct);
161		}
162	});
163
164	win.RokMediaQueries = new RokMediaQuery();
165
166})(window, document));
167
168}
169
170/*
171     FILE ARCHIVED ON 05:45:47 Sep 26, 2022 AND RETRIEVED FROM THE
172     INTERNET ARCHIVE ON 11:06:20 Feb 05, 2026.
173     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
174
175     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
176     SECTION 108(a)(3)).
177*/
178/*
179playback timings (ms):
180  captures_list: 0.598
181  exclusion.robots: 0.018
182  exclusion.robots.policy: 0.007
183  esindex: 0.009
184  cdx.remote: 181.055
185  LoadShardBlock: 151.297 (3)
186  PetaboxLoader3.datanode: 102.706 (4)
187  PetaboxLoader3.resolve: 235.072 (3)
188  load_resource: 227.139
189*/

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.