PageSourceSearch

https://queenofficialapp.com/js/main.js

js queenofficialapp.com collected 2026-09-28 01:44:53 UTC 7,988 bytes, 310 lines download raw bytes

1var votes,page = 0, pageTweets=0,order='updatedAt',filter = '*',$isotope,$isotopeTweets,filterTweets = '*';
2function contains(a, obj) {
3    for (var i = 0; i < a.length; i++) {
4        if (a[i] === obj) {
5            return true;
6        }
7    }
8    return false;
9}
10function createCookie(name, value, days) {
11	"use strict";
12    var expires;
13
14    if (days) {
15        var date = new Date();
16        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
17        expires = "; expires=" + date.toGMTString();
18    } else {
19        expires = "";
20    }
21    document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/";
22}
23function readCookie(name) {
24	"use strict";
25    var nameEQ = encodeURIComponent(name) + "=";
26    var ca = document.cookie.split(';');
27    for (var i = 0; i < ca.length; i++) {
28        var c = ca[i];
29        while (c.charAt(0) === ' ') c = c.substring(1, c.length);
30        if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length));
31    }
32    return null;
33}
34function setActiveVote(){
35	"use strict";
36	var arrayLength = votes.length;
37	for (var i = 0; i < arrayLength; i++) {
38		if ($('.vote[data-id="'+votes[i]+'"]').hasClass('active')===false)
39		{
40			$('.vote[data-id="'+votes[i]+'"]').addClass('active');
41		}
42	}
43}
44function eraseCookie(name) {
45	"use strict";
46    createCookie(name, "", -1);
47}
48$(document).ready(function() 
49{
50	"use strict";
51	votes = readCookie('queenvotes');
52	if (votes===null)
53	{
54		votes = Array();
55	}
56	else
57	{
58		votes = JSON.parse(votes);
59		setActiveVote();
60	}
61	$('#page-content').fullpage({
62		scrollOverflow:true,		
63		afterLoad: function(anchorlink, index){
64			if (index===1)
65			{
66				TweenMax.to('.app-l', .3, {x:0, ease: Power0.easeNone});
67				TweenMax.to('.app-r', .3, {x:0, ease: Power0.easeNone});
68				TweenMax.to('#section-nav a', 1, {backgroundColor:'rgba(50,50,50,.7)'});
69				return false
70			}
71		},
72		onLeave: function(index, nextIndex, direction){
73			if (index === 1) {
74				var windowWidth = $('body').width()/2;
75				TweenMax.to('.app-l', .3, {x:-windowWidth, ease: Power0.easeNone});
76				TweenMax.to('.app-r', .3, {x:windowWidth, ease: Power0.easeNone});
77				TweenMax.to('#section-nav a', 1, {backgroundColor:'rgba(70,70,70,.7)'});				
78	        }	
79		}
80	});
81	$('.top').click(function() {
82		$.fn.fullpage.moveTo(1);
83	    return false;
84	});
85	
86	$('.about').click(function() {
87		$.fn.fullpage.moveTo(2);
88		return false;
89    });
90	$('.gallery').click(function() {
91		$.fn.fullpage.moveTo(3);
92		return false;
93    });
94	$('.tweets-link').click(function() {
95		$.fn.fullpage.moveTo(4);
96		return false;
97    });
98	$('.fancybox-preview').fancybox({
99		padding : 0,
100		fitToView	: true,
101		autoSize	: true,
102		closeClick	: false,
103		prevEffect	: 'fade',
104		nextEffect	: 'fade',
105		helpers	: {
106			thumbs	: {
107				width	: 50,
108				height	: 50
109			}
110		}
111	});	
112	$('.pose').fancybox({
113		padding : 0,
114		maxWidth	: 800,
115		maxHeight	: 600,
116		fitToView	: true,
117		width		: '70%',
118		height		: '70%',
119		autoSize	: true,
120		closeClick	: false,
121		openEffect	: 'none',
122		closeEffect	: 'none'		
123	});
124	$(document).on( "click", ".rock-out", function() {
125		var address = '/videoembed/'+$(this).data('id')+'/';
126		$.fancybox.open({
127			padding : 0,
128			maxWidth:$(this).data('width')-20,
129			maxHeight:$(this).data('height'),
130			autoSize: false,
131			fitToView: true,
132			href:address,
133			type: 'iframe'
134		});	
135        return false;
136    });
137	$('.vote').click(function() {
138		var id = $(this).data('id');
139		if (!contains(votes,id))
140		{
141			$(this).addClass('active');
142			var count = parseInt($(this).parent().find('.count').html());
143			count = count+1;
144			$(this).parent().find('.count').html(count);		
145			votes.push(id);
146			$.ajax({
147				type: "POST",
148				url: '/calls.php',
149				dataType: 'html',
150				data: {functionCall:'vote',id:$(this).data('id')},
151				success: function(data){
152				},
153				error:function(){}
154			});	
155			eraseCookie('queenvotes');	
156			createCookie('queenvotes',JSON.stringify(votes),360);
157		}
158		return false;    
159    });
160	$isotope = $('#gallery').isotope({masonry: {isFitWidth:true}});
161	$isotopeTweets = $('#tweets').isotope({masonry: {isFitWidth:true}});
162	$('#load-more').click(function() {
163		$('#load-more').hide();
164		$('#loading').show();
165        page = page+1;
166		$.ajax({
167			type: "POST",
168			url: '/calls.php',
169			dataType: 'html',
170			data: {functionCall:'getpage',page:page,sortOrder:order},
171			success: function(data){
172  				var html = $.parseHTML( data );
173				if ($.trim(data) === '')
174				{
175					$('#loading').fadeOut(200);	
176					$('#load-more').fadeOut(200);
177					$('#gallery').css('margin-bottom', '250px');
178				}
179				else
180				{
181					$('#gallery').css('margin-bottom', '0px');					
182					$('#load-more').fadeIn(200);
183					$('#loading').fadeOut(200);									
184				}
185				var elems = [];
186				$.each( html, function( i, el ) {
187					$(el).hide();
188					elems.push(el);
189				});
190				$isotope.append( elems ).isotope( 'appended', elems );		
191				setActiveVote();
192
193				$.fn.fullpage.reBuild();				
194			},
195			error:function(){}
196		});			
197		return false;
198    });
199	$('#load-more-tweets').click(function() {
200		$('#load-more-tweets').hide();
201		$('#loading-tweets').show();
202        pageTweets = pageTweets+1;
203		$.ajax({
204			type: "POST",
205			url: '/calls.php',
206			dataType: 'html',
207			data: {functionCall:'getpagetweets',page:pageTweets},
208			success: function(data){
209  				var html = $.parseHTML( data );
210				if ($.trim(data) === '')
211				{
212					
213					$('#loading-tweets').fadeOut(200);	
214					$('#load-more-tweets').fadeOut(200);
215					$('#tweets').css('margin-bottom', '250px');
216				}
217				else
218				{
219					$('#tweets').css('margin-bottom', '0px');					
220					$('#load-more-tweets').fadeIn(200);
221					$('#loading-tweets').fadeOut(200);									
222				}
223				var elems = [];
224				$.each( html, function( i, el ) {
225					$(el).hide();
226					elems.push(el);
227				});
228				$isotopeTweets.append( elems ).isotope( 'appended', elems );		
229				$.fn.fullpage.reBuild();				
230			},
231			error:function(){}
232		});			
233		return false;
234    });	
235	$('.filter-tweets').click(function() {
236		$('.filter-tweets').removeClass('selected');
237		$(this).addClass('selected');
238		if ($(this).data('filter') === 'all')
239		{
240			filterTweets = '*';
241			$isotopeTweets.isotope({ filter: '*' });
242		}
243		else
244		{
245			filterTweets = $(this).data('filter');			
246			$isotopeTweets.isotope({ filter: $(this).data('filter')});	
247		}
248		return false;
249    });	
250	$('.filter').click(function() {
251		$('.filter').removeClass('selected');
252		$(this).addClass('selected');
253		if ($(this).data('filter') === 'all')
254		{
255			filter = '*';
256			$isotope.isotope({ filter: '*' });
257		}
258		else
259		{
260			filter = $(this).data('filter');			
261			$isotope.isotope({ filter: $(this).data('filter')});	
262		}
263		return false;
264    });
265	$('.sort').click(function() {
266		if (!$(this).hasClass('selected')){
267			$('.sort').removeClass('selected');
268			$(this).addClass('selected');
269			$isotope.isotope( 'remove',$('.item'));
270			$('#loading').show();	
271			$('#load-more').hide();	
272			$.fn.fullpage.reBuild();
273			page = 0;	
274			order = $(this).data('order');
275			$('#gallery').fadeOut(300,function(){
276				$.ajax({
277					type: "POST",
278					url: '/calls.php',
279					dataType: 'html',
280					data: {functionCall:'getpage',page:page,sortOrder:order},
281					success: function(data){
282						var html = $.parseHTML( data );
283						if ($.trim(data) === '')
284						{
285							$('#loading').fadeOut(200);	
286							$('#load-more').fadeOut(200);	
287							$('#gallery').css('margin-bottom', '250px');
288						}
289						else
290						{
291							$('#gallery').css('margin-bottom', '0px');					
292						}
293						$isotope.isotope('destroy');
294						$('.item').remove();					
295						$('#gallery').append(html);
296						$('#gallery').fadeIn(500);
297						$isotope = $('#gallery').isotope({filter:filter,masonry: {isFitWidth:true}});
298						$isotope.isotope('layout');
299						setActiveVote();
300						$('#load-more').fadeIn(200);	
301						$('#loading').fadeOut(200);	
302						$.fn.fullpage.reBuild();				
303					},
304					error:function(){}
305				});				
306			});
307		}
308		return false;
309    });
310});

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.