PageSourceSearch

https://www.waramps.ca/js/annual-report-2019.min.js

js waramps.ca collected 2026-09-24 21:43:27 UTC 6,595 bytes, 301 lines download raw bytes

1
2
3
4;(function( w, d, undefined ) {
5	
6	
7	
8	function new_style_tag( css,id ){
9		
10	console.log("ADDING STYLES");
11		//generate style tag @ head
12		var style = d.createElement( "style" );
13		style.id = id+"-style";
14		//add style to document
15		if ( style.styleSheet ){ style.styleSheet.cssText = css; } else { style.innerHTML = css; }
16		d.head.appendChild( style );
17	}
18	
19	
20	
21	//temp add styles to page....
22	//var style_id = "temp-css",
23	//	style_css = "";
24	
25	//new_style_tag( style_css,style_id );
26	
27	
28	
29	// ==========
30	var menu_container = $("#sticky-menu-container")
31	
32	,	menu_btn = $("#top-menu-btn")
33	,	menu_links = $("#sticky-menu")
34	,	menu_holder = $("#sticky-menu-holder")
35	
36	,	menu_btn_inline = $("#inline-menu-btn")
37	,	menu_links_inline = $("#report-menu")
38	
39	,	menu_height = 0
40	
41	
42	,	get = get_screen_size()
43	,	inline_menu_section = "inline-menu-section"
44	,	menu_inline_content = $("#"+inline_menu_section)
45	//menu offset is the y-coord from top of regular menu
46	//,	menu_offset = ( get.width > 640 )?99:65
47	,	menu_offset = ( get.width > 640 )?99:-65
48	
49	
50	,	menu_toggle_speed = 400
51	,	defaultClickEvent = "click" + (( is_touch_device() ) ? " touchstart" : "")
52	
53	;
54	// ==========
55	
56	
57	menu_container.removeClass("hide");
58	menu_holder.removeClass("hide");
59	menu_height = menu_container.height() - menu_links.height();
60	
61	
62	
63	
64	// ==========
65	//update anchorScroll positioning in menu
66	w.WA.menu.setMobileMenuPosition( {_default:99+menu_height,_medium:142/*+menu_height*/,_small:108/*+menu_height*/} );
67	// ==========
68	
69	
70	
71	
72	
73	
74	// ==========
75	//update body classes if iDevice...
76	var body_classes = ( d.body.className ) ? d.body.className.split(" ") : []
77	,	body_classes_length = body_classes.length
78	,	userAgent = navigator.userAgent
79	;
80	// ==========
81	//if apple machine...
82	if ( userAgent.match(/(iPod|iPhone|iPad)/) ){
83		body_classes.push("tablet");
84	}
85	// ==========
86	//if class array length changed...
87	if ( body_classes_length !== body_classes.length ) {
88		d.body.className = body_classes.join(" ");
89	}
90	// ==========
91	
92	
93	
94	
95	
96	
97	// ==========
98	//image lazy loading applied
99	var src = "[data-source-link]";
100	$( src ).each(function(){
101		$(this).unveil( {threshold:300,attribute:src} );
102	});
103	// ==========
104	
105	
106	
107	
108	
109	
110	/*
111	
112	var menu_links_array = [],
113		max_height = 0;
114	// ==========
115	menu_links.find(".flex-child").each( function(){
116		
117		menu_links_array.push( this );
118		if ( $(this).outerHeight() > max_height ){ max_height = $(this).outerHeight(); }
119		
120	} );
121	menu_links_array.forEach( function(target){
122		target.style.height = max_height+"px";
123	} );
124	// ==========
125	max_height = 0;
126	menu_links_inline.find(".flex-child").each( function(){
127		
128		menu_links_array.push( this );
129		if ( $(this).outerHeight() > max_height ){ max_height = $(this).outerHeight(); }
130		
131	} );
132	menu_links_array.forEach( function(target){
133		target.style.height = max_height+"px";
134	} );
135	// ==========
136	*/
137	
138	
139	
140	
141	
142	
143	
144	
145	
146	
147	
148	
149	
150	
151	
152	// ==========
153	//close the menu by default
154	close_menu();
155	// ==========
156	//menu btn functionality
157	menu_btn.bind( defaultClickEvent,function(e){
158		e.preventDefault();
159		e.stopPropagation();
160		
161		if ( menu_links.is(":hidden") ) { open_menu(); }
162		else { close_menu(); }
163	});
164	// ==========
165	//on menu links clicked, collapse menu
166	menu_links.find( 'a[href^="#"]:not([href=#])' ).bind( defaultClickEvent,function(e){
167		close_menu();
168	});
169	// ==========
170	//inline menu btn (@ small) functionality
171	if ( !menu_btn_inline.is(":hidden") ){
172		close_menu(menu_links_inline,0);
173		
174	//	menu_links_inline.find( 'a[href^="#"]:not([href=#])' ).bind( defaultClickEvent,function(e){
175	//		close_menu(menu_links_inline,0);
176	//	});
177	}
178	menu_btn_inline.bind( defaultClickEvent,function(e){
179		e.preventDefault();
180		e.stopPropagation();
181		
182		if ( menu_links_inline.is(":hidden") ) { open_menu(menu_links_inline); }
183		else { close_menu(menu_links_inline); }
184	});
185	// ==========
186	
187	
188	
189	
190	// ==========
191	// menu functionality
192	// ==========
193	function close_menu( target,speed_get ){
194		target = target !== undefined ? target : menu_links;
195		speed_get = typeof speed_get === "number" ? speed_get : menu_toggle_speed;
196		
197		target.slideUp( speed_get );
198	}
199	function open_menu( target,speed_get ){
200		target = target !== undefined ? target : menu_links;
201		speed_get = typeof speed_get === "number" ? speed_get : menu_toggle_speed
202		
203		target.slideDown( speed_get );
204	}
205	// ==========
206	
207	
208	
209	// ==========
210	// Go here for Documentation
211	// http://scrollmagic.io/docs/ScrollMagic.Scene.html
212	// ==========
213	var settings = {};
214	//settings.addIndicators = false;
215	var controller = new ScrollMagic.Controller( settings );
216	var custom_effects = [];
217	// ==========
218	
219	//custom_effects.push( [ "#target-id" , "Scene Parameter" , value ] );
220	//custom_effects.push( [ "#target-id" , "triggerHook" , "onCenter" ] );
221	//custom_effects.push( [ "#target-id" , "offset" , -50 ] );
222	//custom_effects.push( [ "#target-id" , "duration" , 50 ] );
223	
224	// ==========
225	custom_effects.push( [ "#"+inline_menu_section , "triggerHook" , "onLeave" ] );
226	custom_effects.push( [ "#"+inline_menu_section , "offset" , menu_offset ] );
227	// ==========
228	
229	
230	// ==========
231	//add animation functionality and pin menu functionality
232	$(".animate-me").each(function() {
233		
234		var options = {
235			triggerElement:this
236		,	triggerHook:"onEnter"
237		,	offset: 200
238		};
239		
240		var remove_effects = [];
241		
242		//add additional options if applicable
243		for ( var q=0; q < custom_effects.length; q++ ) {
244			
245			var test_obj = $( custom_effects[q][0] );
246			
247			if ( $(this).is( test_obj ) ) {
248				options[ custom_effects[q][1] ] = custom_effects[q][2];
249				custom_effects[q] = "";
250			}
251			
252		}
253		
254		custom_effects = clean_empties_array( custom_effects );
255		
256		//activate "animate-me" elements
257		var scene = new ScrollMagic.Scene( options )
258			.setClassToggle( this, "animated" )
259			.addTo( controller )
260			;
261		
262		//menu functionality
263		if ( this.id === inline_menu_section ) {
264			
265			
266			scene
267				.on( "start", function(e) {
268					
269					if ( e.scrollDirection === "FORWARD" ){
270						//show popup menu
271						menu_container.addClass("active");
272					}
273					else { //REVERSE direction
274						//hide popup menu
275						menu_container.removeClass("active");
276					}
277					
278				})
279			;
280			
281			
282		}
283		
284	});
285	// ========== 
286	
287	
288	
289	
290	
291	
292})( window, document );
293
294
295
296
297
298
299
300
301

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.