PageSourceSearch

https://okmen.edu.vn/js/vtlai/topx/topx.js?_v=0a805783

js okmen.edu.vn collected 2026-10-03 20:37:59 UTC 3,463 bytes, 93 lines download raw bytes

1/*======================================================================*\
2|| #################################################################### ||
3|| # vt.Lai TopX 1.2 For XenForo  by SinhVienIT.net                   # ||
4|| # ---------------------------------------------------------------- # ||
5|| # Copyright ©2013 Vu Thanh Lai. All Rights Reserved.               # ||
6|| # Please do not remove this comment lines.                         # ||
7|| # -------------------- LAST MODIFY INFOMATION -------------------- # ||
8|| # Last Modify: 08-08-2013 11:00:00 PM by: Vu Thanh Lai             # ||
9|| # Please do not remove these comment line if use my code or a part # ||
10|| #################################################################### ||
11\*======================================================================*/
12
13	var TOPX_SIZE='small';
14	var TOPX_SERVER_TIME=0;
15	
16	var TOPX_WRAPPER_SELECTOR='#vtlai-topx';
17	var TOPX_SELECTOR='#vtlai-topx .widget-topx';
18	var TOPX_TAB_SELECTOR='#vtlai-topx ul.topx-tabs .sub-tab';
19	var TOPX_REFRESH_SELECTOR='#vtlai-topx #refresh';
20	var TOPX_COUNT_SELECTOR='#vtlai-topx #vtlai-topx-result-count';
21	var TOPX_RESIZE_SELECTOR='#vtlai-topx ul.topx-tabs #full-list';
22	var TOPX_RIGHTBOX_SELECTOR='#vtlai-topx .widget-ad-300';
23	var TOPX_CONTENTBOX_SELECTOR='#vtlai-topx .topx-content';
24	var TOPX_THREAD_SELECTOR='#vtlai-topx .topx-content .list-link-title a';
25	
26	var TOPX_FULL_WIDTH=0;
27	var TOPX_SMALL_WIDTH=0;
28	var TOPX_RESULT_COUNT=15;
29	var TOPX_RELOAD_SECOND=30;
30	var TOPX_FORUMIDS='all';
31	
32	var TOPX_FUNC_RELOAD=null;
33	$(document).ready(function() {
34		TOPX_FULL_WIDTH=jQuery(TOPX_WRAPPER_SELECTOR).innerWidth();
35		TOPX_SMALL_WIDTH=jQuery(TOPX_SELECTOR).width();
36		TOPX_FUNC_RELOAD=function(setInterv){
37			jQuery.ajax({
38				'url': 'vtlaitopx/?_xfNoRedirect=1&_xfResponseType=json',
39				'data': {'forumids':TOPX_FORUMIDS,'resultCount':TOPX_RESULT_COUNT,'_xfToken':XenForo._csrfToken},
40				'type': 'POST'
41			}).done(function(data){
42				jQuery(TOPX_CONTENTBOX_SELECTOR).html(data.templateHtml);
43				XenForo.activate(TOPX_CONTENTBOX_SELECTOR);
44				if(typeof TOPX_FUNC_TOOLTIP == 'function')
45				{
46					TOPX_FUNC_TOOLTIP();
47				}
48			}).fail(function(){
49				console.error('Lỗi TopX phía server !');
50			});
51			if(typeof setInterv!='undefined' && setInterv)
52				setTimeout("TOPX_FUNC_RELOAD()",TOPX_RELOAD_SECOND*1000);
53		}
54		
55		$(TOPX_TAB_SELECTOR).click(function() {
56			jQuery(TOPX_TAB_SELECTOR).removeClass('active');
57			jQuery(this).addClass('active'); 
58			TOPX_FORUMIDS=jQuery(this).attr('data-forumids');
59			TOPX_FUNC_RELOAD();
60		});
61		$(TOPX_REFRESH_SELECTOR).click(function() {
62			TOPX_FUNC_RELOAD();
63		});
64		$(TOPX_COUNT_SELECTOR).change(function(){
65			TOPX_RESULT_COUNT=jQuery(this).val();
66			TOPX_FUNC_RELOAD();
67		});
68		$(TOPX_RESIZE_SELECTOR).click(function(){
69			if(TOPX_SIZE=='small')
70			{
71				$(TOPX_RIGHTBOX_SELECTOR).fadeOut('fast',function(){
72					$(TOPX_SELECTOR).animate({'width':TOPX_FULL_WIDTH},function(){
73						TOPX_SIZE='large';
74						jQuery(TOPX_WRAPPER_SELECTOR).removeClass('small');
75						jQuery(TOPX_WRAPPER_SELECTOR).addClass('large');
76					});
77				});
78			}
79			else
80			{
81				jQuery(TOPX_WRAPPER_SELECTOR).removeClass('large');
82				jQuery(TOPX_WRAPPER_SELECTOR).addClass('small');
83				$(TOPX_SELECTOR).animate({'width':TOPX_SMALL_WIDTH},function(){
84					$(TOPX_RIGHTBOX_SELECTOR).fadeIn('fast',function(){
85						TOPX_SIZE='small';
86						
87					});
88				});
89			}
90		});
91		
92		TOPX_FUNC_RELOAD(1);
93	});

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.