PageSourceSearch

https://ccojubilee.org/lib/jQuery/jquery.sitestacker.js?1790269769

js ccojubilee.org collected 2026-09-24 19:55:26 UTC 2,743 bytes, 107 lines download raw bytes

1// jQuery create namespace's
2jQuery.namespace = function() {
3	var a = arguments, o=null, i, j, d;
4	for(i = 0; i < a.length; i = i+1) {
5		d = a[i].split(".");
6		o = window;
7		for (j = 0; j < d.length; j = j+1) {
8			o[d[j]] = o[d[j]] || {};
9			o = o[d[j]];
10		}
11	}
12	return o;
13};
14
15// disable all page functionality on any ajax call and re enable it on ajax complete
16// add "global:false" property in any ajax call that should not trigger this.
17$(document).ajaxStart(function(){
18	$('#fullBlur').show();
19});
20$(document).ajaxComplete(function(){
21	$('#fullBlur').hide();
22});
23
24//Accept an object as parameter containing:
25//applyOn = array(css class names)
26//parentDiv = string(css class parent name path without the first dot)
27//nthSelector =  integer(the nth indicator on which to applay css rules)
28//cssRule = object(css properties to be applied)
29function applyCustomCSS(config){
30	var index = 0;
31	var currentClass =  false;
32
33	$(config.parentDiv).children().each(function(loop, object){
34		currentClass = $(object).attr('class');
35		if ($.inArray(currentClass, config.applyOn) > -1){
36			index++;
37		}
38		if (index == config.nthSelector){
39			$(object).css(config.cssRule);
40			index = 0;
41		}
42		if ($.inArray(currentClass, config.applyOn) == -1){
43			index = 0;
44		}
45	})
46}
47
48/**
49 * @param config (array)
50 * Loop trough each selector specified in config.selectors,
51 * get the maximum height and set it to all the config.selectors
52 * You can also specify the measurement type to normal(default), inner, outer
53 */
54function equalizeColumns(config){
55	
56	config = $.extend(true,{
57		selectors:[],
58		heightType: 'normal'
59	},config);
60
61	// define height methods
62	var method = null;
63	if(config.heightType == 'normal'){
64		method = 'height';
65	}
66	if(config.heightType == 'inner'){
67		method = 'innerHeight';
68	}
69	if(config.heightType == 'outer'){
70		method = 'outerHeight';
71	}
72	
73	// get height
74	var maxHeight = 0;
75	$.each(config.selectors, function(index, selector){
76		$(selector).each(function(index, column){
77			var columnHeight = $(column)[method]();
78			if(columnHeight > maxHeight){
79				maxHeight = columnHeight;
80			}
81		});
82	});
83	//set height
84	$.each(config.selectors, function(index, selector){
85		$(selector).each(function(index, column){
86			//$(column)[method](maxHeight);
87			$(column).css({
88				minHeight: maxHeight
89			});
90		});
91	});
92}
93
94// Disable AJAX caching in IE (very important!!)
95if (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {
96    $.ajaxSetup({ cache: false });
97}
98
99// IE 8 support
100if (!Array.prototype.indexOf) {
101    Array.prototype.indexOf = function(obj, start) {
102        for (var i = (start || 0), j = this.length; i < j; i++) {
103            if (this[i] === obj) { return i; }
104        }
105        return -1;
106    }
107}

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.