PageSourceSearch

http://8.498.net/Public/js/admin-scripts.js

js 498.net collected 2026-10-02 15:22:33 UTC 3,330 bytes, 122 lines download raw bytes

1//当浏览器窗口大小改变时重载网页
2/*window.onresize=function(){
3    window.location.reload();
4}*/
5
6//页面加载时给img和a标签添加draggable属性
7(function () {
8    $('img').attr('draggable', 'false');
9    $('a').attr('draggable', 'false');
10})();
11 
12//设置Cookie
13function setCookie(name, value, time) {
14    var strsec = getsec(time);
15    var exp = new Date();
16    exp.setTime(exp.getTime() + strsec * 1);
17    document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/;";
18}
19function getsec(str) {
20    var str1 = str.substring(1, str.length) * 1;
21    var str2 = str.substring(0, 1);
22    if (str2 == "s") {
23        return str1 * 1000;
24    } else if (str2 == "h") {
25        return str1 * 60 * 60 * 1000;
26    } else if (str2 == "d") {
27        return str1 * 24 * 60 * 60 * 1000;
28    }
29}
30 
31//获取Cookie
32function getCookie(name) {
33    var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
34    if (arr = document.cookie.match(reg)) {
35        return unescape(arr[2]);
36    } else {
37        return null;
38    }
39}
40
41var checkall=document.getElementsByName("checkbox[]");  
42//全选
43function select(){
44	for(var $i=0;$i<checkall.length;$i++){  
45		checkall[$i].checked=true;  
46	}  
47};
48//反选
49function reverse(){
50	for(var $i=0;$i<checkall.length;$i++){  
51		if(checkall[$i].checked){  
52			checkall[$i].checked=false;  
53		}else{  
54			checkall[$i].checked=true;  
55		}  
56	}  
57}     
58//全不选     
59function noselect(){ 
60	for(var $i=0;$i<checkall.length;$i++){  
61		checkall[$i].checked=false;  
62	}  
63} 
64 
65//IE6-9禁止用户选中文本
66/*document.body.onselectstart = document.body.ondrag = function () {
67    return false;
68};*/
69 
70//启用工具提示
71$('[data-toggle="tooltip"]').tooltip();
72 
73
74//禁止右键菜单
75/*window.oncontextmenu = function(){
76	return false;
77};*/
78
79/*自定义右键菜单*/
80/*(function () {
81    var oMenu = document.getElementById("rightClickMenu");
82    var aLi = oMenu.getElementsByTagName("li");
83	//加载后隐藏自定义右键菜单
84	//oMenu.style.display = "none";
85    //菜单鼠标移入/移出样式
86    for (i = 0; i < aLi.length; i++) {
87        //鼠标移入样式
88        aLi[i].onmouseover = function () {
89            $(this).addClass('rightClickMenuActive');
90			//this.className = "rightClickMenuActive";
91        };
92        //鼠标移出样式
93        aLi[i].onmouseout = function () {
94            $(this).removeClass('rightClickMenuActive');
95			//this.className = "";
96        };
97    }
98    //自定义菜单
99    document.oncontextmenu = function (event) {
100		$(oMenu).fadeOut(0);
101        var event = event || window.event;
102        var style = oMenu.style;
103        $(oMenu).fadeIn(300);
104		//style.display = "block";
105        style.top = event.clientY + "px";
106        style.left = event.clientX + "px";
107        return false;
108    };
109    //页面点击后自定义菜单消失
110    document.onclick = function () {
111        $(oMenu).fadeOut(100);
112		//oMenu.style.display = "none"
113    }
114})();*/
115
116/*禁止键盘操作*/
117/*document.onkeydown=function(event){
118	var e = event || window.event || arguments.callee.caller.arguments[0];
119	if((e.keyCode === 123) || (e.ctrlKey) || (e.ctrlKey) && (e.keyCode === 85)){
120		return false;
121	}
122}; */

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.