PageSourceSearch

https://chubo-room.com/js/common.js

js chubo-room.com collected 2026-10-08 15:24:45 UTC 4,375 bytes, 135 lines download raw bytes

1var ua = navigator.userAgent;
2var ap = window.navigator.appVersion.toLowerCase();
3$.extend({
4	isSmartPhone: (ua.indexOf('iPhone') != -1 || ua.indexOf('iPad') != -1 || ua.indexOf('iPod') != -1 || ua.indexOf('Android') != -1),
5	isIOS: (ua.indexOf('iPhone') != -1 || ua.indexOf('iPad') != -1 || ua.indexOf('iPod') != -1),
6	isAndroid: (ua.indexOf('Android')!=-1),
7	isIE6: ((ua.indexOf('msie')!=-1 || ua.indexOf('MSIE')!=-1) && (ap.indexOf('msie 6') != -1 || ap.indexOf('MSIE 6') != -1)),
8	isIE7: ((ua.indexOf('msie')!=-1 || ua.indexOf('MSIE')!=-1) && (ap.indexOf('msie 7') != -1 || ap.indexOf('MSIE 7') != -1)),
9	isIE8: ((ua.indexOf('msie')!=-1 || ua.indexOf('MSIE')!=-1) && (ap.indexOf('msie 8') != -1 || ap.indexOf('MSIE 8') != -1)),
10	isIE9: ((ua.indexOf('msie')!=-1 || ua.indexOf('MSIE')!=-1) && (ap.indexOf('msie 9') != -1 || ap.indexOf('MSIE 9') != -1)),
11	isIE10: ((ua.indexOf('msie')!=-1 || ua.indexOf('MSIE')!=-1) && (ap.indexOf('msie 10') != -1 || ap.indexOf('MSIE 10') != -1)),
12	isIE: (ua.indexOf('msie')!=-1 || ua.indexOf('MSIE')!=-1),
13	isFF: (ua.indexOf('Firefox')!=-1),
14	isFF3: function(){
15		if(ua.indexOf('Firefox')!=-1){
16		startNum = ua.indexOf('Firefox');
17		end = ua.length;
18		version = ua.substring(startNum+8,end);
19		//versionNum = version.substring(0,1)
20		if(version<4){
21			return true;
22		}else{
23			return false;
24		};
25	}},
26	isFlashPlugin: function(){
27		if(navigator.plugins['Shockwave Flash'])return true;
28		try{
29			new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
30			return true;
31		}catch(e){
32			return false;
33		}	
34	},
35	isWebKit: (ua.indexOf('Chrome')!=-1 || ua.indexOf('Safari')!=-1),
36	isOpera: (ua.indexOf('opera') != -1 || ua.indexOf('Opera') != -1 || ua.indexOf('OPERA') != -1 )
37});
38
39/*------------------------------------------------------------------------------
40* rollover 
41* ------------------------------------------------------------------------------*/
42function initRollovers() {
43	if (!document.getElementById) return
44	
45	var aPreLoad = new Array();
46	var sTempSrc;
47	var aImages = document.getElementsByTagName('img');
48
49	for (var i = 0; i < aImages.length; i++) {		
50		if (aImages[i].className == 'imgover') {
51			var src = aImages[i].getAttribute('src');
52			var ftype = src.substring(src.lastIndexOf('.'), src.length);
53			var hsrc = src.replace(ftype, '_over'+ftype);
54
55			aImages[i].setAttribute('hsrc', hsrc);
56			
57			aPreLoad[i] = new Image();
58			aPreLoad[i].src = hsrc;
59			
60			aImages[i].onmouseover = function() {
61				sTempSrc = this.getAttribute('src');
62				this.setAttribute('src', this.getAttribute('hsrc'));
63			}	
64			
65			aImages[i].onmouseout = function() {
66				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_over'+ftype, ftype);
67				this.setAttribute('src', sTempSrc);
68			}
69		}
70	}
71}
72
73try{
74	window.addEventListener("load",initRollovers,false);
75}catch(e){
76	window.attachEvent("onload",initRollovers);
77}
78
79
80/*------------------------------------------------------------------------------
81* rollover by fade 
82* ------------------------------------------------------------------------------*/
83$(function(){
84	if(!($.isIE8 || $.isIE7 || $.isIE6)){
85		$(".fade_btn").hover(function(){
86			$(this).stop().fadeTo(200,0.4);
87		},function(){
88			$(this).stop().fadeTo(200,1.0);
89		});
90		
91		$(".fade_over a").hover(function(){
92			$(this).stop().fadeTo(200,0.6);
93		},function(){
94			$(this).stop().fadeTo(200,1.0);
95		});
96	}else{
97		$(".nav_over").hover(function(){
98			if(!$(this).hasClass("now_navi")){
99				$(this).css({"opacity":0.4,"filter":"alpha(opacity=40)", "-ms-filter": "alpha(opacity=40)"});
100			}
101		},function(){
102			if(!$(this).hasClass("now_navi")){
103				$(this).css({"opacity":1,"filter":"alpha(opacity=100)", "-ms-filter": "alpha(opacity=100)"});
104			}
105		});
106	}
107	
108		
109	$(".nav_over").hover(function(){
110		if(!$(this).hasClass("now_navi")){
111			$(this).find("img").stop().animate({marginLeft:10},200,"swing");
112		}
113	},function(){
114		if(!$(this).hasClass("now_navi")){
115			$(this).find("img").stop().animate({marginLeft:0},200,"swing");
116		}
117	});
118});
119
120/*------------------------------------------------------------------------------
121* scroll 
122* ------------------------------------------------------------------------------*/
123$(function(){
124     $("#pagetop a").click(function(){
125     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 600,'swing');
126     return false;
127     })
128     
129          
130     
131     //
132     
133    });
134
135	

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.