PageSourceSearch

https://www.shuziyimin.org/assets/js/xenon-api.js

js shuziyimin.org collected 2026-09-25 22:12:16 UTC 1,793 bytes, 91 lines download raw bytes

1/**
2 *	Xenon API Functions
3 *
4 *	Theme by: www.laborator.co
5 **/
6
7
8function rtl() // checks whether the content is in RTL mode
9{
10	if(typeof window.isRTL == 'boolean')
11		return window.isRTL;
12		
13	window.isRTL = jQuery("html").get(0).dir == 'rtl' ? true : false;
14	
15	return window.isRTL;
16}
17
18
19
20// Page Loader
21function show_loading_bar(options)
22{
23	var defaults = {
24		pct: 0, 
25		delay: 1.3, 
26		wait: 0,
27		before: function(){},
28		finish: function(){},
29		resetOnEnd: true
30	};
31	
32	if(typeof options == 'object')
33		defaults = jQuery.extend(defaults, options);
34	else
35	if(typeof options == 'number')
36		defaults.pct = options;
37		
38	
39	if(defaults.pct > 100)
40		defaults.pct = 100;
41	else
42	if(defaults.pct < 0)
43		defaults.pct = 0;
44	
45	var $ = jQuery,
46		$loading_bar = $(".xenon-loading-bar");
47	
48	if($loading_bar.length == 0)
49	{
50		$loading_bar = $('<div class="xenon-loading-bar progress-is-hidden"><span data-pct="0"></span></div>');
51		public_vars.$body.append( $loading_bar );
52	}
53	
54	var $pct = $loading_bar.find('span'),
55		current_pct = $pct.data('pct'),
56		is_regress = current_pct > defaults.pct;
57	
58	
59	defaults.before(current_pct);
60	
61	TweenMax.to($pct, defaults.delay, {css: {width: defaults.pct + '%'}, delay: defaults.wait, ease: is_regress ? Expo.easeOut : Expo.easeIn,
62	onStart: function()
63	{
64		$loading_bar.removeClass('progress-is-hidden');
65	},
66	onComplete: function()
67	{
68		var pct = $pct.data('pct');
69		
70		if(pct == 100 && defaults.resetOnEnd)
71		{
72			hide_loading_bar();
73		}
74		
75		defaults.finish(pct);
76	}, 
77	onUpdate: function()
78	{
79		$pct.data('pct', parseInt($pct.get(0).style.width, 10));
80	}});
81}
82
83function hide_loading_bar()
84{
85	var $ = jQuery,
86		$loading_bar = $(".xenon-loading-bar"),
87		$pct = $loading_bar.find('span');
88	
89	$loading_bar.addClass('progress-is-hidden');
90	$pct.width(0).data('pct', 0);
91}

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.