PageSourceSearch

https://staffonlystudio.com/js/base.js?v=1651886666

js staffonlystudio.com collected 2026-10-07 00:02:50 UTC 8,627 bytes, 334 lines download raw bytes

1$(function(){
2	
3	
4
5})
6
7// 预加载hover图片,让hover的时候不会短暂空白
8document.addEventListener("DOMContentLoaded", function(){
9  if(document.images){
10	var img1 = new Image();
11	img1.src = "images/button-normal-black.png";
12	var img2 = new Image();
13	img2.src = "images/button-normal-grey.png";
14	var img3 = new Image();
15	img3.src = "images/button-hover-grey.png";
16	var img4 = new Image();
17	img4.src = "images/button-hover-black.png";
18	var img5 = new Image();
19	img5.src = "images/button-normal-yellow.png";
20	var img6 = new Image();
21	img6.src = "images/button-hover-yellow.png";
22  }
23
24}); 
25	
26$(document).ready(function(){
27	
28        autochange()
29
30        window.onresize = function(){
31
32			autochange();	
33			fix_popup_press()
34        } 
35
36	});
37
38
39
40	//<!--根据窗口大小调整-->
41function autochange() {
42		
43		
44		
45    document.addEventListener('gesturestart', function (e) {
46        e.preventDefault();
47    });
48    document.addEventListener('dblclick', function (e) {
49        e.preventDefault();
50    });
51    document.addEventListener('touchstart', function (event) {
52        if (event.touches.length > 1) {
53            event.preventDefault();
54        }
55    });
56    var lastTouchEnd = 0;
57    document.addEventListener('touchend', function (event) {
58        var now = (new Date()).getTime();
59        if (now - lastTouchEnd <= 300) {
60            event.preventDefault();
61        }
62        lastTouchEnd = now;
63    }, false);
64	
65	
66	
67	
68	
69		var screen_width = $(window).width();//window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
70		var screen_height =$(window).height(); // window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;	
71		//var w=$(".menu").width();
72
73		
74	
75		if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)|| screen_width<800) {
76			//移动端不变化
77			
78			if ( $('.fullbg').length > 0 ) { 
79				if (screen_width/screen_height>2440/3152){
80					$(".fullbg").css({"background-size":"100% auto"});}
81				else
82					{$(".fullbg").css({"background-size":"auto 100%"});
83					}
84				
85				if (screen_width>800){
86					$(".fullbg").css({"background-size":"auto 100%"});
87				}
88			}
89			
90			/*if ( $('.today').length > 0 ) { 
91				setTimeout(function () {
92					var n2=$('.today').offset().left
93					alert(n2)
94					$(".todayadd").css({"left":""+n2+"px"});
95				},10)
96			}*/
97			
98		}else
99		{
100			
101			/*if (screen_width>1920){
102				$("html").css({"font-size":"180%"});
103			}else{
104				$("html").css({"font-size":"100%"});
105			}*/
106			if ( $('.fullbg').length > 0 ) { 
107				if (screen_width/screen_height>2880/1840){
108					$(".fullbg").css({"background-size":"100% auto"});}
109				else
110					{$(".fullbg").css({"background-size":"auto 100%"});
111					}
112			}
113			
114			if ( $('.today').length > 0 ) { 
115				setTimeout(function () {
116					var n2=$('.today').offset().left
117					$(".todayadd").css({"left":""+n2+"px"});
118				},100)
119			}
120		}
121	
122	
123	
124	
125	
126	
127	
128  //  var windowTop = 0; //初始话可视区域距离页面顶端的距离
129	$(".iphone__screen").css({"position": "static"})
130	$(".nav--active").css({"position": "absolute"})
131	$(window).scroll(function() {		
132		//获取滚动条的滑动距离
133		//var scroH = $(this).scrollTop();
134		//滚动条的滑动距离大于等于定位元素距离浏览器顶部的距离,就固定,反之就不固定
135	//	var scrolls = $(this).scrollTop(); //获取当前可视区域距离页面顶端的距离
136		//alert(scrolls + "|" + windowTop)
137		
138		//var screen_width = $(window).width();
139		
140		//var scrolls = $(this).scrollLeft()
141
142    
143})
144	}
145
146	
147	
148	
149	
150	
151	
152	
153	
154	
155function showhide(i){     
156i = document.getElementById(i);
157if (i.style.display == "block") {
158		$(i).fadeOut()
159		//i.style.display = "none";
160	}else{
161		//i.style.display = "block";
162		$(i).fadeIn()
163	}
164} 
165
166function show_float(i){     
167i = document.getElementById(i);
168	//i.style.display = "inline";
169		$(i).fadeIn()
170	//$(i).css({"margin-top":"0px"});
171	togglebody(1)
172}
173function show_float_move(i){     
174i = document.getElementById(i);
175	//i.style.display = "inline";
176		$(i).fadeIn()
177	$(i).css({"margin-top":"0px"});
178	//togglebody(1)
179}
180function hide_float(i){     
181i = document.getElementById(i);
182	$(i).fadeOut()
183	//i.style.display = "none";
184	togglebody(0)
185
186	
187} 
188
189
190function logintime() {
191
192    var date = new Date(); //日期对象
193    //date=date.replace(/-/g, "/")
194    var now = "";
195    show_minutes = "0" + date.getMinutes()
196    show_minutes = show_minutes.slice(-2)
197
198    now = date.getHours() + "<span class='second'>:</span>" + show_minutes;
199    document.getElementById("nowTimeM").innerHTML = now;
200    document.getElementById("nowTime").innerHTML = now;
201
202    document.getElementById("div_week1").innerHTML = getMyDay(date);
203    document.getElementById("div_week2").innerHTML = getMyDay(date);
204
205    setTimeout("logintime()", 1000);
206}
207
208function getMyDay(date) {
209    var week;
210    //var hid_lang = document.getElementById("hid_lang").value;
211    //if (hid_lang == "0") {
212    //    if (date.getDay() == 0) week = "周日";
213    //    if (date.getDay() == 1) week = "周一";
214    //    if (date.getDay() == 2) week = "周二";
215    //    if (date.getDay() == 3) week = "周三";
216    //    if (date.getDay() == 4) week = "周四";
217    //    if (date.getDay() == 5) week = "周五";
218    //    if (date.getDay() == 6) week = "周六";
219    //}
220    //else {
221        if (date.getDay() == 0) week = "SUN";
222        if (date.getDay() == 1) week = "MON";
223        if (date.getDay() == 2) week = "TUES";
224        if (date.getDay() == 3) week = "WED";
225        if (date.getDay() == 4) week = "THUR";
226        if (date.getDay() == 5) week = "FRI";
227        if (date.getDay() == 6) week = "SAT";
228    //}
229    return week;
230}
231
232//修正 popup_press 宽度和位置
233function fix_popup_press(){
234	
235	var screen_width = $(window).width();
236	var screen_height =$(window).height();
237	
238		if (screen_width>800){
239			//桌面端
240				//setTimeout(function () {
241					//var popup_press_detail_height=$(".press_box").height();
242					//var popup_press_top=(screen_height-popup_press_detail_height)/2
243					popup_press_top=screen_height*0.15
244					$(".popup_press .press_box").css({"margin-top":""+popup_press_top+"px"});
245				//},10)
246				
247				//setTimeout(function () {
248					//var popup_press_detail_height=$(".press_box").height();
249					//var popup_press_top=(screen_height-popup_press_detail_height)/2
250					popup_press_top=screen_height*0.15
251					$(".popup_press .press_box").css({"margin-top":""+popup_press_top+"px"});
252				//},500)
253			
254		}
255		else
256		{//移动端
257			//var popup_press_detail_height=$(".press_box .detail").height();
258			//var popup_press_top=(screen_height/2-popup_press_detail_height)/2
259			popup_press_top=screen_height*0.15
260			$(".popup_press .press_box").css({"margin-top":""+popup_press_top+"px"});
261		}
262}
263
264
265//弹出窗口后,禁止后端页面滚动
266function togglebody(isPin){
267	if(isPin){
268		document.body.style.height='100vh'
269		document.body.style['overflow-y']='hidden'
270	}else{
271		document.body.style.height='unset'
272		document.body.style['overflow-y']='auto'
273		
274		
275	}
276}
277
278
279
280function show_schedule(thisname){    
281	$(".calendar_type li").removeClass("this-normail");
282	
283	$(".type_seasons").fadeOut('fast')
284	$(".type_project").fadeOut('fast')
285	$(".type_news").fadeOut('fast')
286	switch(thisname) {
287	case 'all':
288		$(".calendar_type li:nth-child(1)").addClass("this-normail");
289		$(".type_seasons").fadeIn()
290		$(".type_project").fadeIn()
291		$(".type_news").fadeIn()	
292		break;
293	case 'seasons':
294		$(".calendar_type li:nth-child(2)").addClass("this-normail");
295		$(".type_seasons").fadeIn()
296		break;
297	case 'project':
298		$(".calendar_type li:nth-child(3)").addClass("this-normail");
299		$(".type_project").fadeIn()
300		break;
301	case 'news':
302		$(".calendar_type li:nth-child(4)").addClass("this-normail");
303		$(".type_news").fadeIn()
304		break;
305	}
306	
307}
308
309
310
311
312//移动到日期里某个位置
313function calendar_goto(thedate){
314	
315	setTimeout(function(){
316
317		$("#calendar").mCustomScrollbar("scrollTo","#"+thedate);
318
319	},50);
320
321
322}
323
324function changeImage(src){
325	//$(".float_img").fadeIn(1500)
326	$(".float_img").css({"background":"url("+src+") no-repeat center center","background-size":"auto 100%"})
327	//,"filter":" blur(0px)"
328	}
329function clearImage(){
330	//$(".float_img").fadeOut(300)
331	$(".float_img").css({"background":"none no-repeat center center"})
332	//,"filter":" blur(20px)"
333	
334}

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.