PageSourceSearch

https://anime-amnesia.com/core_sys/js/common.js

js anime-amnesia.com collected 2026-09-24 20:39:56 UTC 6,111 bytes, 193 lines download raw bytes

1function MM_preloadImages() { //v3.0
2  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
3    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
4    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
5}
6
7function MM_swapImgRestore() { //v3.0
8  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
9}
10
11function MM_swapImage() { //v3.0
12  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
13   if ((x=a[i])!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
14}
15
16function MM_openBrWindow(theURL,winName,features) { //v2.0
17  obj = window.open(theURL,winName,features);
18  obj.focus();
19}
20
21function change_Disp(Obj,flg) {
22	if(flg == 1){
23		if(nn4){
24			Obj.visibility = "show";
25		}else{
26			Obj.style.visibility = "visible";
27		}
28	}else if(flg == 2){
29		if(nn4){
30			Obj.visibility = "hide";
31		}else{
32			Obj.style.visibility = "hidden";
33		}
34	}
35}
36
37function change_H(Obj,W,H) {
38	if(nn4){
39		Obj.resizeTo(W,H);
40	}else if(nn6) {
41		Obj.style.height = H + "px";
42		Obj.style.width = W + "px";
43	}else if(ie) {
44		Obj.style.pixelHeight = H;
45		Obj.style.pixelwidth = W;
46	}else if(opera) {
47		Obj.style.height = H;
48		Obj.style.width = W;
49	}
50}
51
52function focusColor(i){
53	i.style.backgroundColor='#fffcdb';
54}
55function blurColor(i){
56	i.style.backgroundColor='#ffffff';
57}
58
59//ブラウザ情報の取得
60dom = document.getElementById; //W3C DOM をサポートする場合
61opera = navigator.userAgent.indexOf("Opera")>-1; //Opera
62safari=(navigator.userAgent.indexOf("Safari")!=-1) || false;
63ie4 = document.all && !dom && !opera; //Internet Explorer 4.x
64ie5 = document.all && dom && !opera; //Internet Explorer 5.x 以上
65ie = ie4 || ie5; //Internet Explorer 4.x 以上
66netscape = navigator.appName.indexOf("Netscape",0)>-1; //Netscape
67nn4 = document.layers && netscape; //Netscape 4.x
68nn6 = dom && netscape; //Netscape 6.x 以上
69
70
71//スタイルスイッチ
72function setActiveStyleSheet(title) {
73  var i, a, main;
74  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
75    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
76      a.disabled = true;
77      if(a.getAttribute("title") == title) a.disabled = false;
78    }
79  }
80}
81
82function getActiveStyleSheet() {
83  var i, a;
84  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
85    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
86  }
87  return null;
88}
89
90function getPreferredStyleSheet() {
91  var i, a;
92  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
93    if(a.getAttribute("rel").indexOf("style") != -1
94       && a.getAttribute("rel").indexOf("alt") == -1
95       && a.getAttribute("title")
96       ) return a.getAttribute("title");
97  }
98  return null;
99}
100
101function createCookie(name,value,days) {
102  if (days) {
103    var date = new Date();
104    date.setTime(date.getTime()+(days*24*60*60*1000));
105    var expires = "; expires="+date.toGMTString();
106  }
107  else expires = "";
108  document.cookie = name+"="+value+expires+"; path=/";
109}
110
111function readCookie(name) {
112  var nameEQ = name + "=";
113  var ca = document.cookie.split(';');
114  for(var i=0;i < ca.length;i++) {
115    var c = ca[i];
116    while (c.charAt(0)==' ') c = c.substring(1,c.length);
117    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
118  }
119  return null;
120}
121
122window.onload = function(e) {
123  var cookie = readCookie("style");
124  var title = cookie ? cookie : getPreferredStyleSheet();
125  setActiveStyleSheet(title);
126}
127
128window.onunload = function(e) {
129  var title = getActiveStyleSheet();
130  createCookie("style", title, 365);
131}
132
133var cookie = readCookie("style");
134var title = cookie ? cookie : getPreferredStyleSheet();
135setActiveStyleSheet(title);
136
137//==== returns a layer reference
138function rgnavi(gname) {
139	if (ie4) {
140		gnavi = eval("document.all."+gname+".style")
141	 }
142	else if (nn4) {
143		gnavi = eval("document.layers['"+gname+"']");
144	 }
145	else if (nn6 || ie5 || safari || opera) {
146		gnavi = eval("document.getElementById('"+gname+"').style")
147	 }
148	return gnavi
149}
150var MM_contentVersion = 6;
151var MM_FlashCanPlay = false;
152var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
153if (plugin) {
154	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
155	for (var i = 0; i < words.length; ++i) {
156		if (isNaN(parseInt(words[i])))
157		continue;
158		var MM_PluginVersion = words[i];
159	}
160	MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
161}
162else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0
163	&& (navigator.appVersion.indexOf("Win") != -1)) {
164	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
165	document.write('on error resume next \n');
166	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
167	document.write('</SCR' + 'IPT\> \n');
168}
169
170
171
172
173/* Flash write
174--------------------------------------------------------------------------	*/
175
176function object_write(file_path, obj_width, obj_height, obj_name, obj_color, obj_wmode){
177	var obj = '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" data="'+file_path+'" id="'+obj_name+'" width="'+obj_width+'" height="'+obj_height+'">';
178
179	if (obj_wmode == "true"){
180		obj += '<param name="wmode" value="transparent">';
181		var w_mode = 'wmode=transparent';
182	} else {
183		var w_mode = '';
184	}
185
186	obj += '<param name="menu" value="false">';
187	obj += '<param name="movie" value="'+file_path+'">';
188	obj += '<param name="quality" value="high">';
189	obj += '<param name="bgcolor" value="#'+ obj_color +'">';
190	obj += '<embed src="'+file_path+'" menu=false width='+obj_width+' height='+obj_height+' quality=high bgcolor=#'+obj_color+' name='+obj_name+' align=middle type=application/x-shockwave-flash pluginspage="https://www.macromedia.com/go/getflashplayer" '+w_mode+'><'+'/embed><'+'/object>';
191
192	document.write(obj);
193}

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.