ギコナビ
Revision | e197e76508834997bc131530d8125b6fa9b2d30c (tree) |
---|---|
Time | 2006-05-27 23:09:19 |
Author | genyakun <genyakun> |
Commiter | genyakun |
最新版(Ver3.6.1231)に差し替え
@@ -16,7 +16,7 @@ | ||
16 | 16 | var start_time = new Date(); |
17 | 17 | //==========O[oÏ |
18 | 18 | var anchorHead=""; |
19 | -var skinName="skin30-2 v3.5.0704"; | |
19 | +var skinName="skin30-2 v3.6.1231"; | |
20 | 20 | var browser="MRir"; |
21 | 21 | //==========MRirpAJ[Ì»èi0:³µ,1:|bvAbv,2:{^}üj |
22 | 22 | // MRirÅÍAXAJ[ÍÎAhXÅLq³êé |
@@ -48,6 +48,16 @@ function threadurl(){ | ||
48 | 48 | t_bbs=RegExp.$1; |
49 | 49 | t_key=RegExp.$2; |
50 | 50 | } |
51 | +//==========ñ\¦XÌ\¦-MRirÌÝ | |
52 | +function hiddenRes(e){ | |
53 | + var number=tohan(event.srcElement.innerText.replace(/>|/g,"")); | |
54 | + var i=0;while(document.anchors[i].name.match(/\D/)){i++} | |
55 | + var startRes=parseInt(document.anchors[i+1].name.replace(/\D/g,"")); | |
56 | + if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1);} | |
57 | + else {var start=parseInt(number);} | |
58 | + //alert(startRes+">"+start+" && "+start+"!="+1); | |
59 | + if(startRes>start && start!=1){return true}else{return false} | |
60 | +} | |
51 | 61 | </script> |
52 | 62 | </head> |
53 | 63 | <body> |
@@ -7,8 +7,11 @@ dt a{text-decoration:none;} | ||
7 | 7 | dd a{text-decoration:underline;line-height:1.1} |
8 | 8 | |
9 | 9 | /* õÊ */ |
10 | -#foundResult a {color:LightSlateGray;} | |
11 | -#foundResult a:hover{color:#000;} | |
10 | +#foundPanel{color:LightSlateGray;} | |
11 | +#foundPanel div {font-family:"lr SVbN";} | |
12 | +#foundPanel div span{font-family:Times;cursor:hand;} | |
13 | +#foundPanel a {color:LightSlateGray;} | |
14 | +#foundPanel a:hover{color:#000;} | |
12 | 15 | |
13 | 16 | /* dt */ |
14 | 17 | dt{ |
@@ -1,18 +1,22 @@ | ||
1 | +//========V WvÝè | |
2 | +var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
3 | +var newResJump=1; // V XWvi0:uEUC¹A1:ǹÌÝA2:íj©¿ãAOpenJaneAtwintailÌÝÌÝè | |
4 | +//==========ȺÍXNvg{¶Å·æB | |
1 | 5 | //Cxgnhè` |
2 | 6 | //OÖFtohan |
3 | 7 | //OÏFanchorHead,lightmode,getID,skinName,browser,dts |
4 | -//O[oÏ | |
5 | -var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
6 | -var newResJump=1; // V XWvi0:uEUC¹A1:ǹÌÝA2:íj©¿ãAOpenJaneAtwintailÌÝÌÝè | |
8 | +//=========Ot@C¤pÌO[oÏ | |
9 | +var waited=false;//command\¦ãtrueɵAIðãÉfalseÉ·éB | |
10 | +var viewed=false;//thumbÇÝãtrueɵAthumbPanelÉæ~ãfalseÉ·éB | |
11 | +var searched=false; //õãÉAtrueɵAfoundPanelÉæ~ãfalseÉ·éB | |
12 | +var cp,tp,vp,fp; | |
7 | 13 | //========Click¨search,¼ |
8 | 14 | document.onclick = clickEvent; |
9 | 15 | function clickEvent(){ |
10 | 16 | if(clickCancel){return false}else{clearTimeout(clickTimer);if(document.getElementById("context")){document.getElementById("context").removeNode(true);}} |
11 | 17 | var obj=window.event.srcElement; |
12 | 18 | var tag=obj.tagName; |
13 | - if (tag=="B") {search(obj.parentElement)} //¼O | |
14 | - else if(tag=="U") {search(obj)} //gbv | |
15 | - else if(tag=="SPAN"){if(getID(obj)){searchID(obj)}} //ID | |
19 | + if(tag=="B"||tag=="U"||tag=="SPAN"){searchPerson(obj)} //¼O,gbv,ID | |
16 | 20 | else if(tag=="DT") {searchRef(obj)} |
17 | 21 | else if(tag=="DD") {defaultPopup()} |
18 | 22 | else if(tag=="A"){ |
@@ -23,7 +27,7 @@ function clickEvent(){ | ||
23 | 27 | if(obj.href.match(/^http:.*#/)){window.open(obj.href,"_parent");return false} |
24 | 28 | } |
25 | 29 | //A Boneâ³iñ\¦XÌ\¦j |
26 | - if(browser=="A Bone" && hidedRes(obj)){showModelessDialog(document.getElementsByName("ThreadURL")[0].content+tohan(obj.innerText.replace(/[>]/g,"")),window,"dialogWidth:"+document.body.clientWidth+"px;help:no;resizable:yes;status:no;unadorned:yes;");window.focus();} | |
30 | + if((browser=="A Bone"||browser=="MRir") && hiddenRes(obj)){showModelessDialog(document.getElementsByName("ThreadURL")[0].content.replace(/\/l50$/,"/")+tohan(obj.innerText.replace(/[>]/g,"")),window,"dialogWidth:"+document.body.clientWidth+"px;help:no;resizable:yes;status:no;unadorned:yes;");window.focus();} | |
27 | 31 | //Jane,Live,MRirâ³iskin30-2NormalyÑMRirjXWvªscrollIntoViewÅÈ¢àÌÉWéâ³ |
28 | 32 | if(browser=="A Bone" || browser=="OpenJane" || browser=="Live2ch" || browser=="MRir"){if(obj.href.match(/^about|jumpres/)){ |
29 | 33 | var h=tohan(obj.innerText.replace(/[>]/g,"")); |
@@ -32,17 +36,17 @@ function clickEvent(){ | ||
32 | 36 | }} |
33 | 37 | return true; |
34 | 38 | } |
35 | - else{return} | |
39 | + else{panelOver();return} | |
36 | 40 | } |
37 | 41 | |
38 | 42 | //=========MouseOver¨image,popup |
39 | 43 | document.onmouseover = mouseOverEvent; |
40 | 44 | function mouseOverEvent() { |
41 | 45 | var e = window.event.srcElement; |
42 | - if(e.tagName=='B'){ | |
46 | + if(e.tagName=='B'){if(browser!="twintail2"){ | |
43 | 47 | if(e.innerText.match(/^([^\dO-X]*)([\dO-X]+)([^\dO-X]*.*)/)){namePopup(e,RegExp.$1,RegExp.$2,RegExp.$3);} |
44 | 48 | else if(e.innerText.match(/^ Ú`ñ$/)) {abonePopup(e);} |
45 | - } | |
49 | + }} | |
46 | 50 | if(e.tagName=='A'){ |
47 | 51 | if(!e.innerText.match(/%/)){ // URLGR[hŠ調È%ªÈ¯êÎ |
48 | 52 | //e.href=e.href.replace(/>/g,""); |
@@ -55,9 +59,8 @@ function mouseOverEvent() { | ||
55 | 59 | } |
56 | 60 | } |
57 | 61 | if (checkAnchor(e.href)==2){insButton(e);return;} |
58 | - else if(checkAnchor(e.href)==1){ | |
62 | + else if(checkAnchor(e.href)==1){ // ½i|bvAbv | |
59 | 63 | if(event.shiftKey){if(e.rel){e.href=e.rel}return} |
60 | - // ½i|bvAbv | |
61 | 64 | var parent=e.parentElement; |
62 | 65 | var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; |
63 | 66 | if(!document.getElementById("p"+aNum)){ |
@@ -66,49 +69,48 @@ function mouseOverEvent() { | ||
66 | 69 | if(!onPopup){removePopup()} |
67 | 70 | makePopContent(e);return; |
68 | 71 | } |
72 | + }else if(checkAnchor(e.href)==0){ // tQÆ|bvAbv | |
73 | + if(e.href.match(/menu:/) && event.shiftKey){searchPopup(e)} | |
69 | 74 | } |
75 | + }else if(e.tagName=="SPAN"||e.tagName=="TT"){ | |
76 | + var obj=e;var onPopup; | |
77 | + while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}} | |
78 | + if(e.tagName=="SPAN"){ | |
79 | + if(!onPopup && event.shiftKey){searchPopup(e)} | |
80 | + }else{searchPopup(e)} | |
70 | 81 | }else{ // ½i|bvAbvÁ |
71 | 82 | var obj=e;var onPopup; |
72 | 83 | if(obj.sourceIndex<0){obj=document.body;if(document.getElementById("popupBase")){onPopup=true;}} // namePopupÆÌ£Åm[hªOêéuÔÌñð |
73 | - while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement;}} | |
84 | + while(obj.tagName!="BODY"){if(obj.id.match(/(p\d+)/)){onPopup=true;break}else{obj=obj.parentElement;}} | |
74 | 85 | if(onPopup){while(obj.id!=obj.parentElement.lastChild.id){obj.parentElement.lastChild.removeNode(true)}} |
75 | 86 | else {removePopup()} |
76 | 87 | } |
77 | - if(e.tagName=="DT"){setHash();} | |
78 | - if(e.tagName=="SPAN"){ | |
79 | - var obj=e;var onPopup; | |
80 | - while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}} | |
81 | - if(!onPopup && event.shiftKey){searchPopup(event.toElement);} return; | |
82 | - } | |
83 | 88 | } |
84 | -//=========MouseMove¨menuOver(),tpOver() | |
89 | +//=========MouseMove¨panelOver() | |
85 | 90 | document.onmousemove=mouseMoveEvent; |
86 | -var waited=false;//command\¦ãtrueɵAIðãÉfalseÉ·éB | |
87 | -var viewed=false;//thumbÇÝãtrueɵAthumbPanelÉæ~ãfalseÉ·éB | |
88 | -var cp,tp,vp; | |
89 | 91 | function mouseMoveEvent() { |
90 | 92 | if(!cp){ |
91 | - var nHTML ="<div id='controlPanel'><input type='button' value='TOP' onclick='scroll_Top();blur()'><input type='button' value='END' onclick='scroll_End();blur()'><input type='button' value='IMG' onmouseup='imgCommand();blur()'><input type='button' value='FND' onclick='findIt(document.selection.createRange().text);blur()'></div>"; | |
92 | - if(skinName.match(/30-2/)){nHTML+="<div id='thumbPanel' onmouseout='viewed=false'></div><div id='viewPanel'></div>";} | |
93 | - document.body.insertAdjacentHTML('afterBegin',nHTML); | |
94 | - cp=document.getElementById("controlPanel"); | |
95 | - if(skinName.match(/30-2/)){tp=document.getElementById("thumbPanel");vp=document.getElementById("viewPanel");} | |
93 | + var nHTML ='<div id="controlPanel"><input type="button" value="TOP" onclick="scroll_Top();blur()"><input type="button" value="END" onclick="scroll_End();blur()"><input type="button" value="IMG" onmouseup="imgCommand();blur()"><input type="button" value="FND" onclick="fndCommand();blur();"></div><div id="foundPanel" onmouseout="searched=false"></div>'; | |
94 | + if(skinName.match(/30-2/)){nHTML+='<div id="thumbPanel" onmouseout="viewed=false"></div><div id="viewPanel"></div>';} | |
95 | + document.body.insertAdjacentHTML("afterBegin",nHTML); | |
96 | + cp=document.getElementById("controlPanel");fp=document.getElementById("foundPanel"); | |
97 | + if(skinName.match(/30-2/)){tp=document.getElementById("thumbPanel");vp=document.getElementById("viewPanel");}else{tp=vp=new Object()} | |
98 | + cp.condition="waited";tp.condition="vp.firstChild || viewed || !lightmode";fp.condition=resultView ? "fp.hasChildNodes()" : "searched"; | |
99 | + cp.territory="<25"; tp.territory=">20"; fp.territory="<(30+fp.clientHeight) && fp.hasChildNodes()"; | |
96 | 100 | } |
97 | - cpOver(); | |
98 | - tpOver(); | |
101 | + if(event){panelOver();} | |
102 | + if(!idHash.length){setHash();searchColoring();} | |
99 | 103 | } |
100 | -// Rg[pl | |
101 | -function cpOver(){ | |
104 | +// epl | |
105 | +function panelOver(){ | |
102 | 106 | var territoryW=document.body.clientWidth-120;var territoryH=25; |
103 | - if(waited){cp.style.visibility="visible";return} | |
104 | - if(event.y<territoryH && event.x>territoryW){cp.style.visibility="visible";}else{cp.style.visibility="hidden";} | |
105 | -} | |
106 | -// TlCpl | |
107 | -function tpOver(){ | |
108 | - if(skinName.match(/30-3/) || !lightmode){return} | |
109 | - var territoryW=document.body.clientWidth-120;var territoryH=20; | |
110 | - if(document.getElementById("viewPanel").firstChild || viewed){tp.style.visibility="visible";return} | |
111 | - if(event.y>territoryH && event.x>territoryW){tp.style.visibility="visible";}else{tp.style.visibility="hidden";} | |
107 | + var panels=new Array("cp","tp","fp"); | |
108 | + for(var i in panels){ | |
109 | + if(skinName.match(/30-3/)&&panels[i]=="tp"){continue} | |
110 | + var panel=eval(panels[i]); var territoryY=eval("event.y"+panel.territory); var territoryX=eval(event.x>document.body.clientWidth-panel.offsetWidth-15); | |
111 | + if(eval(panel.condition)){panel.style.visibility="visible";return} | |
112 | + if(territoryY && territoryX){panel.style.visibility="visible";}else{panel.style.visibility="hidden";} | |
113 | + } | |
112 | 114 | } |
113 | 115 | // TOP,END |
114 | 116 | function scroll_Top(){document.getElementsByTagName("DL")[0].firstChild.scrollIntoView(true);} |
@@ -127,6 +129,14 @@ function imgCommand(mode,s){ | ||
127 | 129 | clearCommand(); |
128 | 130 | } |
129 | 131 | } |
132 | +function fndCommand(mode,s){ | |
133 | + if(!waited){ | |
134 | + findIt(document.selection.createRange().text); | |
135 | + event.cancelBubble=true; | |
136 | + }else{ | |
137 | + clearCommand(); | |
138 | + } | |
139 | +} | |
130 | 140 | function clearCommand(){ |
131 | 141 | waited=false; |
132 | 142 | document.getElementById("command").removeNode(true); |
@@ -174,7 +184,7 @@ function key(){ | ||
174 | 184 | else if(code=="36"){scroll_Top()} |
175 | 185 | else if(code=="35"){scroll_End()} |
176 | 186 | else if(code=="73" && event.shiftKey){changePanel();return false;} // shift+I |
177 | - else if(code=="70" && event.shiftKey){cp.childNodes[3].click();return false;} // shift+F | |
187 | + else if(code=="70" && event.shiftKey){findIt(document.selection.createRange().text);return false;} // shift+F | |
178 | 188 | else if(code=="78" && event.shiftKey && firstNew){firstNew.scrollIntoView(true)} // shift+N |
179 | 189 | else if(code=="82" && event.shiftKey && event.ctrlKey){ // ctrl+shift+R |
180 | 190 | //©¿ã`µáâ³iÂXVÌV[gJbgL[j |
@@ -190,7 +200,7 @@ function key(){ | ||
190 | 200 | //=========©¿ãAABoneA]kQ |
191 | 201 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
192 | 202 | var k=0; |
193 | -function loadEvent(num){ //setTimeout("setHash();",100); | |
203 | +function loadEvent(num){ | |
194 | 204 | //====V XWv |
195 | 205 | if(newResJump==0){clearInterval(timerID);return} //uuEUC¹vÈçI¹ |
196 | 206 | //V XÌJnÔðæ¾ |
@@ -209,7 +219,7 @@ function loadEvent(num){ //setTimeout("setHash();",100); | ||
209 | 219 | //=========V Xæ¾ãiWXLÎuEUpj©NewMark©çÄÑoµ |
210 | 220 | //=========OpenJAtwin |
211 | 221 | var scr,viewPos,endPos=0; |
212 | -function reloadEvent(){ //setTimeout("setHash();",100); | |
222 | +function reloadEvent(){ | |
213 | 223 | //====ùÇ» |
214 | 224 | var lastDt=dts[dts.length-2];if(!lastDt){return}// SV ÈçI¹ |
215 | 225 | while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;} |
@@ -242,10 +252,10 @@ function defaultPopup(){ | ||
242 | 252 | obj.innerText=num; |
243 | 253 | obj.href="#"+hnum; |
244 | 254 | makePopContent(obj); |
245 | - }else if(num.match(/\w/) && num.length==8){ //\w{8}Å;ßÛH | |
246 | - var obj=document.createElement("span"); | |
247 | - obj.innerText="date time ID:"+num; | |
248 | - setHash();searchID(obj); | |
255 | + }else if(num.match(/\w{8,9}/)){ //\w{8}Å;ßÛH | |
256 | + var obj=document.createElement("DT"); | |
257 | + obj.innerHTML="<span>date time ID:"+num+"</span>"; | |
258 | + searchPerson(obj.firstChild); | |
249 | 259 | } |
250 | 260 | } |
251 | 261 |
@@ -260,5 +270,14 @@ function copyEvent(){ | ||
260 | 270 | copyText.execCommand("Copy"); |
261 | 271 | return false; |
262 | 272 | } |
263 | -//=========onLoadiDAT2HTMLÌÝj | |
264 | -window.onload=function(){setHash()} | |
273 | +//=========onScroll | |
274 | +//window.onscroll=function(){clearInterval(beforeScrollTimer);onLoadEvent()} | |
275 | +window.onscroll=function(){onLoadEvent()} | |
276 | +if(document.getElementById("dl")){ | |
277 | + document.getElementById("dl").onscroll=function(){onLoadEvent()} | |
278 | +} | |
279 | +//=========onLoad | |
280 | +window.onload=onLoadEvent; | |
281 | +function onLoadEvent(){mouseMoveEvent();setHash();searchColoring();} | |
282 | +setTimeout("onLoadEvent()",1000); // êñ¾¯ F | |
283 | + |
@@ -18,7 +18,7 @@ input,button{ | ||
18 | 18 | } |
19 | 19 | #thumbPanel div{ |
20 | 20 | width:100px; |
21 | - margin-bottom:2px; | |
21 | + margin-bottom:0px; | |
22 | 22 | border:solid 1px #D6DCE1; |
23 | 23 | background-color:#FFF; |
24 | 24 | text-align:right; |
@@ -1,9 +1,11 @@ | ||
1 | -// CxgnhFonMouseover | |
2 | -// OÖFaddAnchor | |
3 | -// OÏFcp,tp,vp,dds | |
4 | 1 | //======æÇÌÝè |
2 | +var onOpenLoad =1; // XÇÌæÇ@0:ÇÝÜÈ¢A1:V XÌÝA2:S | |
5 | 3 | var onMouseLoad=true; // true:J[\ðí¹½¾¯Afalse:LOAD{^ðNbNµÄ©ç |
6 | 4 | var takeArisk=false; // true:æÇÝÝÉ[hØÖAfalse:è®Å[hØÖ |
5 | +//==========ȺÍXNvg{¶Å·æB | |
6 | +// CxgnhFonMouseover | |
7 | +// OÖFaddAnchor | |
8 | +// OÏFcp,tp,vp,dds | |
7 | 9 | //==========O[oÏ |
8 | 10 | //==========æ |
9 | 11 | var lightmode = true; |
@@ -56,14 +58,22 @@ function insButton(a,hRH) { | ||
56 | 58 | var nHTML='<input type="button" value="LOAD" onClick=\'loadImage(this,"'+a.href+'");blur()\'>' |
57 | 59 | +'<input type="button" value="VIEW" onClick=\'changeView("swf","'+a.href+'");blur()\'>'; |
58 | 60 | }else{ |
59 | - if(hRH){var ahref=hRH}else{var ahref=a.href} | |
61 | + var ahref=(hRH)?hRH:a.href; | |
60 | 62 | if(ahref.match(/^javascript:.*'(.*)'.*/)){ahref=RegExp.$1+document.getElementsByName("ThreadURL")[0].content;a.href=ahref} |
61 | 63 | var nHTML='<input type="button" value="VIEW" onClick=\'changeView("html","'+ahref+'");blur()\'>' |
62 | - ;//+'<input type="button" value="CHECK" onClick=\'changeView("html","http://www.tekijuku.com/URL/?url='+ahref+'");blur()\'>'; | |
64 | + +'<input type="button" value="CHECK" onClick=\'changeView("html","http://so.7walker.net/?site='+ahref+'");blur()\'>'; | |
63 | 65 | } |
64 | 66 | a.insertAdjacentHTML('AfterEnd',nHTML); |
65 | 67 | a.className = 'replaced'; |
66 | - if(onMouseLoad && imageExt2(a.href)){loadImage(a.nextSibling,a.href)} | |
68 | + if(imageExt2(a.href)){ | |
69 | + if(!event||event.type=="mousemove"||event.type=="scroll"){ // autoImageLoadÅÌÇ | |
70 | + if(onOpenLoad){loadImage(a.nextSibling,a.href)} | |
71 | + }else if(event.type=="mouseover"){ // mouseoverÅÌÇ | |
72 | + if(onMouseLoad){loadImage(a.nextSibling,a.href)} | |
73 | + }else if(event.type=="click"){ // allImageloadÅÌÇ | |
74 | + loadImage(a.nextSibling,a.href); | |
75 | + } | |
76 | + } | |
67 | 77 | return; |
68 | 78 | } |
69 | 79 | } |
@@ -71,19 +81,19 @@ function insButton(a,hRH) { | ||
71 | 81 | function loadImage(btn,href){ |
72 | 82 | if(!panel){changePanel()} |
73 | 83 | if(takeArisk && lightmode){changeMode()} |
74 | - if(btn.tagName!="A"){ | |
75 | - var thumbs = document.images; | |
76 | - var l=thumbs.length; | |
77 | - for(var i=l;i--;){if(thumbs[i].src==href){ | |
78 | - if(lightmode){tp.style.visibility="visible";viewed=true;} | |
79 | - //thumbs[i].scrollIntoView(true); | |
80 | - imgOver(thumbs[i],100); | |
81 | - return true; | |
82 | - }} | |
83 | - } | |
84 | + // ¯êæmF | |
85 | + var thumbs = document.images; | |
86 | + var l=thumbs.length; | |
87 | + for(var i=l;i--;){if(thumbs[i].src==href){ | |
88 | + if(lightmode){tp.style.visibility="visible";viewed=true;} | |
89 | + //thumbs[i].scrollIntoView(true); | |
90 | + imgOver(thumbs[i],100); | |
91 | + return true; | |
92 | + }} | |
84 | 93 | if(btn.parentElement.tagName=="DD"){var dt = btn.parentElement.previousSibling;} |
85 | 94 | else {var dt = btn.parentElement;} |
86 | 95 | var num = dt.firstChild.innerText; |
96 | + if(href.match(/www.securityfocus.com/)){if(!confirm(num+"ÌXÉ éhttp://www.securityfocus.com/ÌæÍuNÌÂ\«ª¢Å·ªAJ«Ü·©H")){return}} | |
87 | 97 | if(href.search(/\.swf/i)==-1){ |
88 | 98 | var nHTML = '<div><img src="'+href+'" onLoad="imgResult(this)" onError="imgResult(this)" onClick="changeView(\'img\')" onmouseover="imgOver(this,100)" onmouseout="imgOver(this,30)">' |
89 | 99 | +addAnchor(num,num)+' ' |
@@ -106,7 +116,14 @@ function loadImage(btn,href){ | ||
106 | 116 | function imgResult(img){ |
107 | 117 | var btn=img.parentElement.children.item(2); |
108 | 118 | if(event.type=="load"){btn.value='___'; img.style.display='block';} |
109 | - else {btn.value='NONE';btn.style.color='#C00';setTimeout("viewed=false",3000)} | |
119 | + else {btn.value='NONE';btn.style.color='#C00';} | |
120 | + if(event.type=="error"){ | |
121 | + var dt=getDTfromAnc(img.parentElement.children.item(1).innerText); | |
122 | + var ddAnc=dt.nextSibling.getElementsByTagName("A"); | |
123 | + var a;var i=0;do{a=ddAnc[i];i++;}while(a.href!=img.href); | |
124 | + var btn=a.nextSibling; | |
125 | + btn.value='NONE';btn.style.color='#C00'; | |
126 | + } | |
110 | 127 | } |
111 | 128 | // TCYÌØÖ |
112 | 129 | function changeSize(btn){ |
@@ -187,12 +204,10 @@ function allImageLoad(mode){ | ||
187 | 204 | var ddl=dds.length;var exist; |
188 | 205 | for(var i=0;i<ddl;i++){ |
189 | 206 | if(mode=="new"){if(dds[i].previousSibling.className!="new"){continue}} |
190 | - cl=dds[i].childNodes.length; | |
191 | - for(j=0;j<cl;j++){ | |
192 | - cn=dds[i].childNodes[j]; | |
193 | - if(cn.tagName == "A"){ | |
194 | - if(imageExt2(cn.href)){loadImage(cn,cn.href);exist=true} | |
195 | - } | |
207 | + var ddAnc=dds[i].getElementsByTagName("A"); | |
208 | + for(j=0;j<ddAnc.length;j++){ | |
209 | + cn=ddAnc[j]; | |
210 | + if(imageExt2(cn.href)){insButton(cn,cn.href);exist=true} | |
196 | 211 | } |
197 | 212 | } |
198 | 213 | if(!exist){ |
@@ -1,4 +1,6 @@ | ||
1 | +//==========ȺÍXNvg{¶Å·æB | |
1 | 2 | // CxgnhFonMouseover |
3 | +// OÏFidHash,refHash,foudRes,highlight | |
2 | 4 | // OÖFaddAnchor,getDTfromAnc |
3 | 5 | // Á¥FDIV#popupBaseºÉutbgÅjAvÉDL#p\dð쬷éB |
4 | 6 | //==========CSSÌoÍ |
@@ -9,65 +11,65 @@ nCSS+='#popupBase dl{position:absolute; background-color:window; border:outset 1 | ||
9 | 11 | nCSS+='#popupBase dt span{float:none; margin-left:1em;}'; |
10 | 12 | nCSS+='#popupBase dd{margin:auto 1em}'; |
11 | 13 | document.write('<style type="text/css">'+nCSS+'</style>\n'); |
12 | -//=========O[oÏ | |
13 | -var pb; | |
14 | +//=========Ot@C¤pÌO[oÏ | |
14 | 15 | //=========io[ȼOÌ|bvAbv |
15 | 16 | function namePopup(e,before,num,after){ |
16 | 17 | var hnum=tohan(num); |
17 | - //RüNASüNASocket774A774KBA21ÖA[1-30]AÈÇͳ | |
18 | - if(before){if(hnum==5 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
18 | + if(hnum==774 || hnum==21 || hnum==1 || hnum==30){return} // Socket774A774KBA21ÖA[1-30]AÈÇͳ | |
19 | + if(before && before.match(/¼³/)){return} //¼³µÁÛ¢Ìͳ | |
20 | + if(after) {if(after=="üN"){return}} // ftHgÈ"üN"ͳ | |
19 | 21 | var nB = before ? "<b>"+before+"</b><b>":"<b>"; nB+=addAnchor(hnum,num); nB+=after ? "</b><b>"+after+"</b>":"</b>"; |
20 | 22 | e.outerHTML=nB; |
21 | 23 | } |
22 | 24 | //=========ã Ú`ñÌ|bvAbv |
23 | -function abonePopup(e){ | |
24 | - var hnum=e.parentElement.previousSibling.innerText; | |
25 | - e.outerHTML = "<b>"+addAnchor(hnum,' Ú`ñ')+"</b>"; | |
25 | +function abonePopup(e){e.outerHTML = "<b>"+addAnchor(e.parentElement.previousSibling.innerText,' Ú`ñ')+"</b>";} | |
26 | +//=========õµ½XÌ|bvAbv | |
27 | +function searchPopup(obj){ | |
28 | + var reg,cArray;var tag=obj.tagName; | |
29 | + /*ref Popup*/if (tag=="A") {if(refHash[obj.innerText]){cArray=refHash[obj.innerText].split(" ")}else{return}} | |
30 | + /*ID Popup*/ else if(tag=="SPAN"){reg=getID(obj);if(reg&®.length>3){cArray=idHash[reg].split(" ");}else{return} if(cArray.length==1){return}} | |
31 | + /*õPopup*/else if(tag=="TT") {var cHash=(obj.parentElement.rel=="res")?foundRes:highlight;cArray=cHash[obj.parentElement.firstChild.style.backgroundColor];if(!cArray){return}} | |
32 | + var targetString=""; for(var i=0;i<cArray.length;i++){targetString+=returnString(cArray[i]);} //gÌØèoµ | |
33 | + if(targetString){popup(targetString);} //ÎÛª¶Ýµ½ç|bvAbv | |
26 | 34 | } |
27 | 35 | //=========½i|bvAbv |
28 | 36 | //E|bvAbvÌì¬ |
29 | -var startRes; | |
30 | 37 | function makePopContent(obj){ |
31 | 38 | //Oõ |
32 | - var num=obj.innerText.replace(/[>]/g,""); | |
33 | - var number=tohan(num); | |
34 | - if(!obj.rel){obj.rel=obj.href;} | |
35 | - obj.href="decoy:"; | |
36 | - //²¸ | |
37 | - if(document.anchors.length==1){return} //Xª1ÈçI¹ | |
38 | - if(!startRes){startRes=parseInt(document.anchors[1].name.replace(/\D/g,""))} | |
39 | + var num=obj.innerText.replace(/[>]/g,""); var number=tohan(num); | |
40 | + if(!obj.rel){obj.rel=obj.href;} obj.href="decoy:"; // uEU{ÌÌ|bvAbvñð | |
41 | + //Ô²¸ | |
39 | 42 | if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1); var end=parseInt(RegExp.$2);} |
40 | 43 | else {var start=end=parseInt(number);} |
41 | -// alert(startRes+">"+end+" && "+end+"!=1") | |
42 | - if(startRes>end && end!=1){obj.href=obj.rel;return}//¶ÝµÄ¢È¯êÎI¹ | |
44 | + if(end-start>100){end=start+100} // 100Èã\¦µÈ¢ | |
43 | 45 | //gÌØèoµ |
44 | - var targetString=""; if(end-start>100){end=start+100} | |
45 | - if(start==end){targetString=returnString(start)} | |
46 | - else {for(var i=0;i<=end-start;i++){targetString+=returnString(start+i)}} | |
46 | + var targetString=""; for(var i=0;i<=end-start;i++){targetString+=returnString(start+i)} | |
47 | 47 | //ÎÛª¶Ýµ½çrelÉÞðµÄ|bvAbv |
48 | 48 | if(targetString){popup(targetString);}else{obj.href=obj.rel;} |
49 | 49 | } |
50 | 50 | //EgÌØèoµ |
51 | 51 | function returnString(num){ |
52 | 52 | var obj=getDTfromAnc(num); |
53 | + setSearchColor(obj);//|bvAbvæÌ F | |
53 | 54 | if(!obj){return("")} //ÎÛª§¾ Ú`ñÈçI¹ |
54 | - var dt,dd,dtOuter,ddOuter; | |
55 | - dt=obj.cloneNode(true); | |
56 | - dtOuter=dt.outerHTML.replace(/name=.*?>/,">"); // LABELNUMBERÎÌàÌÉWéNAJ[Ì | |
57 | - dd=obj.nextSibling.cloneNode(true); | |
55 | + var dt=obj.cloneNode(true); | |
56 | + var dtOuter=dt.outerHTML.replace(/name=.*?>/,">"); // LABELNUMBERÎÌàÌÉWéNAJ[Ì | |
57 | + var dd=obj.nextSibling.cloneNode(true); | |
58 | 58 | if(dd.hasChildNodes()){ |
59 | 59 | while(dd.lastChild.name){dd.lastChild.removeNode(true)} // LABELNUMBERñÎÌàÌÉWéNAJ[Ì |
60 | 60 | if(dd.lastChild.tagName=="DL"){dd.lastChild.removeNode(true)} // tQÆÌ |
61 | 61 | } |
62 | - ddOuter=dd.outerHTML; | |
62 | + var ddOuter=dd.outerHTML; | |
63 | 63 | return(dtOuter+ddOuter); |
64 | 64 | } |
65 | 65 | //E|bvAbv |
66 | +var pb; | |
66 | 67 | function popup(inner){ |
67 | 68 | if(!pb){document.body.insertAdjacentHTML('afterBegin','<div id="popupBase"></div>');pb=document.getElementById("popupBase")} |
68 | 69 | //vfÌì¬ |
69 | 70 | var parent=event.srcElement.parentElement; |
70 | - var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; // DDÈO¼OAæAIDõ | |
71 | + //var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; // DDÈO¼OAæAIDõ | |
72 | + var aNum=event.srcElement.sourceIndex;if(!aNum){alert("aNumæ¾G[")} | |
71 | 73 | if(document.getElementById('p'+aNum)){return} // |bvAbvµÄ½çI¹ |
72 | 74 | pb.insertAdjacentHTML("beforeEnd",'<dl id="p'+aNum+'">'+inner+'</dl>'); |
73 | 75 | //vfÌzu |
@@ -75,16 +77,16 @@ function popup(inner){ | ||
75 | 77 | // y²²® |
76 | 78 | var pos=Math.min(event.y,document.body.clientHeight-event.y); |
77 | 79 | var scTop=document.body.scrollTop+event.y; |
78 | - if(pos==event.y){var y=scTop-30;} // º | |
79 | - else {var y=scTop+10-p.clientHeight;} // ã | |
80 | + if(pos==event.y){var y=scTop-30;} // J[\̺Ö\¦ | |
81 | + else {var y=scTop+10-p.clientHeight;} // J[\ÌãÖ\¦ | |
80 | 82 | if(y<0){y=0} |
81 | - if(event.srcElement.parentElement.id=="foundResult"){y+=30} | |
83 | + if(event.srcElement.parentElement.tagName=="TT"){y+=35;} | |
82 | 84 | p.style.pixelTop=y; |
83 | 85 | // x²²® |
84 | 86 | var pos=Math.min(event.x,document.body.clientWidth-event.x); |
85 | 87 | var scLeft=document.body.scrollLeft+event.x; |
86 | - if(pos==event.x){var x=scLeft-2} // E | |
87 | - else {var x=scLeft-4-p.clientWidth;} // ¶ | |
88 | + if(pos==event.x){var x=scLeft-2} // J[\ÌEÖ\¦ | |
89 | + else {var x=scLeft-4-p.clientWidth;} // J[\̶Ö\¦ | |
88 | 90 | if(x<0){x=0} |
89 | 91 | p.style.pixelLeft=x; |
90 | 92 | // ³²®iscrollBarðv·êÆvµÈ¢êª éj¨y²²® |
@@ -1,243 +1,398 @@ | ||
1 | -// út¶ñÌ FÝè@ F·é:1@ FµÈ¢:0 | |
2 | -coloring=1; | |
3 | -threshold1=[2,"#0000FF"]; // «Ýª¡ éID ̵«¢lÆF | |
4 | -threshold2=[5,"#FF0000"]; // «Ýª½ éID ̵«¢lÆF | |
5 | -threshold3=[1,"#0000FF"]; // «Ýª é X ̵«¢lÆXÔÌF | |
6 | -threshold4=[4,"#FF0000"]; // «Ýª½ éX ̵«¢lÆXÔÌF | |
7 | -// CxgnhFonClick | |
8 | -// OÖFaddAnchor,checkAnchor,tohan | |
9 | -// OÏFanchorHead,browser | |
10 | -// Á¥FCxg¶DTÉηéDDºÉADL-DT-DD\¢ð쬷éB | |
1 | +beID=false; // beÉOCoéêÍAtrue | |
2 | +//==========õÝè | |
3 | +var expression="multiAND"; // õû@@@default:WAregExp:³K\»AmultiAnd:ANDõAmultiOR:ORõ | |
4 | +var searchView="resList"; // õÊ\¦@@resList:YXÔ\¦AresPopup:YX|bvAbvA | |
5 | +var resultView=false; // õÊÌí\¦@@true:í\¦Afalse:}EXÅßï½Æ«ÌÝ\¦ | |
6 | +var listLimit =10; // searchViewªresPopupÅÈ¢êÌAXÔÌ\¦§À | |
7 | +//==========XÔAút¶ñÌ FÝè | |
8 | +coloring=1; // F·é:1@ FµÈ¢:0 | |
9 | +threshold1=[2,"#0000ff"]; // «Ýª¡ éID ̵«¢lÆF | |
10 | +threshold2=[5,"#aaaa00"]; // «Ýª½ éID ̵«¢lÆF | |
11 | +threshold3=[8,"#ff0000"]; // «Ýª½ éID ̵«¢lÆF | |
12 | +threshold4=[1,"#0000FF"]; // «Ýª é X ̵«¢lÆXÔÌF | |
13 | +threshold5=[4,"#aaaa00"]; // «Ýª½ éX ̵«¢lÆXÔÌF | |
14 | +threshold6=[7,"#ff0000"]; // «Ýª½ éX ̵«¢lÆXÔÌF | |
15 | +//==========¼OEIDõÉæéXÌÑÌFwèi16iÍWeb`®ÌF¼ÅwèB¢ÂÅàÂBAt@xbgͬ¶Å¨è¢j | |
16 | +var foundResColor =new Array("#ffdfee","#eeffdf","#ffeedf","#dfffee","#eedfff","#ffffe1"); | |
17 | +//==========PêõÉæénCCgFwèi¯ãj | |
18 | +var highlightColor=new Array("#ffff66","#a0ffff","#99ff99","#ff9999","#ff66ff","#880000","#00aa00","#886800","#004699","#990099"); | |
19 | +//==========ȺÍXNvg{¶Å·æB | |
20 | +// CxgnhFonClick,onScroll,onMousemove | |
21 | +// OÖFaddAnchor,checkAnchor,tohan,searchPopup | |
22 | +// OÏFanchorHead,browser,fp | |
23 | +// tQÆÌÁ¥FCxg¶DTÉηéDDºÉADL-DT-DD\¢ð쬷éB | |
11 | 24 | //==========CSSÌoÍ |
12 | 25 | var nCSS=''; |
13 | -nCSS+='#foundResult{position:absolute;top:expression(body.scrollTop+25);right:18px;padding:2px 5px;z-index:6;background-color:white;border:1px solid #999}'; | |
26 | +nCSS+='#foundPanel {position:absolute;top:expression(body.scrollTop+25);right:18px;padding:2px 5px;z-index:6;background-color:white;border:1px solid #999;visibility:hidden}'; | |
27 | +nCSS+='#foundPanel div{padding-left:5px;text-align:right;font-size:100%;}'; | |
14 | 28 | nCSS+='.refResult{margin:0.5em 0.3em; border:1px solid #666;padding-right:0px}'; |
15 | 29 | nCSS+='.refResult{border-top:none}'; |
16 | 30 | nCSS+='.refResult dt{margin-right:0px;}'; |
17 | 31 | nCSS+='.refResult dd{margin-left:0.8em;}'; |
18 | 32 | document.write('<style type="text/css">'+nCSS+'</style>\n'); |
19 | -//==========õÉæéFwèi16iÍWeb`®ÌF¼ÅwèB¢ÂÅàÂj | |
20 | -var foundColor = new Array("#ffdfee","#eeffdf","#ffeedf","#dfffee","#eedfff","#ffffe1"); | |
21 | 33 | var nCSS=''; |
22 | -for(var css=0;css<foundColor.length;css++){ | |
23 | - nCSS+='#COLOR'+css+" a{border-color:"+foundColor[css]+"}"; | |
24 | - nCSS+='#COLOR'+css+" a:hover{border-color:red}"; | |
34 | +for(var css in foundResColor){ | |
35 | + var c=foundResColor[css].replace(/#/,""); | |
36 | + nCSS+='#COLOR'+c+" a{border-color:"+foundResColor[css]+"}\n"; | |
37 | + nCSS+='#COLOR'+c+" a:hover{border-color:red}\n"; | |
25 | 38 | } |
26 | 39 | document.write('<style type="text/css">'+nCSS+'</style>\n'); |
27 | -//==========O[oÏ | |
40 | +//=========Ot@C¤pÌO[oÏ | |
28 | 41 | var dts=document.getElementsByTagName('DT'); |
29 | 42 | var dds=document.getElementsByTagName('DD'); |
30 | -var fR; | |
43 | +var idHash=new Array(); var refHash=new Array(); | |
44 | +var foundRes,highlight; | |
31 | 45 | //==========IDÆQÆðnbV Éi[ |
32 | -var idHash=new Array(); var refHash=new Array(); var searchEnd=0; | |
46 | +// zñÌnbV æèy¢ÁÛ¢ÌÅAóæØèÌlÉæéPÈnbV ɵÄÝéeXgB | |
47 | +// setEndIdx:{¶Ì¯Xðd¡µÈ¢æ¤ÉAHash»ÊuƵÄÌdtsÌÅIindexðL¯ | |
48 | +// setEndNum:{¶ÈOXðd¡µÈ¢æ¤ÉAÅIXÔðL¯ | |
49 | +var setEndIdx=setEndNum=0; | |
33 | 50 | function setHash(){ |
34 | - var l=dts.length; | |
35 | - if(dts[l-1].rel=="setEnd"){return} // ÅãÜŲ¸ÏÝÈçñð | |
36 | - for(var i=searchEnd;i<l;i++){ | |
51 | + //var t0=new Date(); | |
52 | + var l=Math.min(dts.length,dds.length); | |
53 | + var lastNum=l ? parseInt(dts[l-1].firstChild.innerText) : 0; | |
54 | + if(isNaN(lastNum)&&l>1){lastNum=parseInt(dts[l-2].firstChild.innerText)} //Footer èÈçêÂO | |
55 | + if(l==0 || lastNum<=setEndNum){return} // ÅãÜŲ¸ÏÝÈçñð | |
56 | + for(var i=setEndIdx;i<l;i++){ | |
37 | 57 | if(dds[i].parentElement.className=="refResult"){continue} // tQÆàÌDDÈçñð |
38 | 58 | var num=dts[i].firstChild.innerText; var span=dts[i].lastChild; |
39 | 59 | // ID |
40 | - var t=getID(span); idHash[t] = idHash[t] ? idHash[t]+" "+num : num; | |
41 | - // ref | |
60 | + var t=getID(span); if(t&&t.length>3){idHash[t] = idHash[t] ? idHash[t]+" "+num : num;} // ???âID:0,ID:#(@]k)ÍX[B | |
61 | + // æ | |
62 | + var imgURL=getIMG(span); | |
63 | + if(imgURL){ | |
64 | + var dd=dts[i].nextSibling; | |
65 | + if(tp && imgURL && !dd.getElementsByTagName("IMG").length){ | |
66 | + var aObj=(dd.innerText)?'<br><a href="'+imgURL+'">'+imgURL+'</a>':'<a href="'+imgURL+'">'+imgURL+'</a>'; | |
67 | + if(!beID && imgURL.match(/kako/)){/*dd.insertAdjacentHTML("beforeEnd","<br>BeÉOCµÄÈ¢Ææ¾Å«Ü¹ñ");*/}else{dd.insertAdjacentHTML("beforeEnd",aObj)} | |
68 | + } | |
69 | + } | |
70 | + // ref,IMG | |
42 | 71 | var ddAnc=dds[i].getElementsByTagName("A"); |
43 | - for(var j=ddAnc.length;j--;){ | |
44 | - if(checkAnchor(ddAnc[j].href)!=1){continue} | |
45 | - var anc=tohan(ddAnc[j].innerText.replace(/[>]/g,"")); | |
46 | - if(anc.match(/(\d*)\D+(\d*)/)){ | |
47 | - var start=parseInt(RegExp.$1); var end=parseInt(RegExp.$2); | |
48 | - if(end-start>100){continue} // >>1-1000Æ©ÍØíÉX[ | |
49 | - else if(num-end<3 && start==1){continue} // >>1-n(¼OX)ÍË,Æ©àX[ | |
50 | - for(var k=start;k<=end;k++){ | |
51 | - if(refHash[k] && refHash[k].indexOf(num)!=-1){continue} // d¡ÍX[ | |
52 | - if(num>=k){refHash[k]=refHash[k] ? refHash[k]+" "+num : num;} // ¢ÖÌAJ[ÍX[ | |
72 | + for(var j=0;j<ddAnc.length;j++){ | |
73 | + if (checkAnchor(ddAnc[j].href)==0){ | |
74 | + continue; | |
75 | + }else if(checkAnchor(ddAnc[j].href)==1){ | |
76 | + var anc=tohan(ddAnc[j].innerText.replace(/[>]/g,""));var start,end; | |
77 | + if(anc.match(/(\d*)\D+(\d*)/)){ | |
78 | + start=parseInt(RegExp.$1); end=parseInt(RegExp.$2); | |
79 | + if( (end-start>100) || (num-end<4 && start==1) ){continue} // >>1-1000Æ©>>1-n(¼OX)Æ©ÍØíÉX[ | |
80 | + }else{ | |
81 | + start=end=parseInt(anc); | |
53 | 82 | } |
54 | - }else{anc=parseInt(anc); | |
55 | - if(refHash[anc] && refHash[anc].indexOf(num)!=-1){continue} // d¡ÍX[ | |
56 | - if(num>=anc){refHash[anc]=refHash[anc] ? refHash[anc]+" "+num : num;} // ¢ÖÌAJ[ÍX[ | |
83 | + var k=start-1;do{k++; | |
84 | + if((!refHash[k] || refHash[k].indexOf(num)==-1) && num>k){refHash[k]=refHash[k] ? refHash[k]+" "+num : num;} // d¡â¢ÖÌAJ[ÍX[ | |
85 | + }while(k<end); | |
86 | + }else if(imageExt2(ddAnc[j].href) && onOpenLoad!=0){ | |
87 | + if(onOpenLoad==1){if(dds[i].previousSibling.className!="new"){continue}} | |
88 | + insButton(ddAnc[j],ddAnc[j].href); | |
57 | 89 | } |
58 | 90 | } |
59 | 91 | } |
60 | - dts[l-1].rel="setEnd"; searchEnd=l; | |
92 | + setEndIdx=l;setEndNum=lastNum; | |
93 | + //var t1=new Date(); var t=(t1-t0)/1000; if(t){alert(t+"b");} | |
94 | +} | |
95 | +// XbhEBhESÉOã5Xð F | |
96 | +var resUnit=new Array(); | |
97 | +function searchColoring(){ | |
61 | 98 | if(!coloring){return;} // FsvÈçI¹ |
62 | - for(var i=l;i--;){ | |
63 | - if(!dts[i].innerText){continue} | |
64 | - //if(dts[i].innerText.match(/id:/i)){ // IDªÈ¢ÂÅA¬»·é©àH | |
65 | - var span=dts[i].lastChild; var t=getID(span); if(browser=="zbg]kQ"){span=span.lastChild} | |
66 | - if(t && idHash[t] && span){ | |
67 | - var idResult=idHash[t].split(/\s/); if(t.match(/\?\?\?/)){idResult="";idHash[t]="";} | |
68 | - if (idResult.length>=threshold2[0]){span.style.color=threshold2[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
69 | - else if(idResult.length>=threshold1[0]){span.style.color=threshold1[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
70 | - else if(idResult.length==1){span.title="¯êIDÍ\n èܹñ"} | |
71 | - } | |
72 | - //} | |
73 | - var imgURL=getIMG(span); | |
74 | - if(imgURL){dds[i].insertAdjacentHTML("afterBegin",'<img src="'+imgURL+'"><br>')} | |
75 | - // | |
76 | - var numA=dts[i].firstChild; var num=numA.innerText; | |
77 | - if(refHash[num]){ | |
78 | - var refResult=refHash[num].split(/\s/); | |
79 | - if (refResult.length>=threshold4[0]){numA.style.color=threshold4[1];dts[i].title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
80 | - else if(refResult.length>=threshold3[0]){numA.style.color=threshold3[1];dts[i].title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
81 | - else{numA.title="±êÖÌXÍÈ¢Íl"} | |
99 | + if(!scr){scr=lightmode ? document.body : document.getElementById("dl");} | |
100 | + var nowScrollPos=scr.scrollTop+document.body.clientHeight/2; | |
101 | + var l=Math.min(dts.length,dds.length);var st,ed; | |
102 | + // dtÌoffsetTopði[i25XPÊj | |
103 | + if(resUnit.length<=Math.floor(dts.length/25)){resUnit[0]=0; | |
104 | + for(var i=25;i<l;i+=25){resUnit[i/25]=dts[i].offsetTop;} | |
105 | + } | |
106 | + // »ÝÇÌ ½èÜÅXN[µÄ驲¸ | |
107 | + var rul=resUnit.length-1; | |
108 | + if (rul==0) {st=0;ed=l-1;} //25¢ | |
109 | + else if(resUnit[0]>nowScrollPos) {st=0;ed=24;} //0-24 | |
110 | + else if(resUnit[rul]<nowScrollPos){st=l-26;ed=l-1;} // ÅI25X | |
111 | + else{ | |
112 | + for(var i=rul;i--;){ | |
113 | + if(resUnit[i+1]>nowScrollPos&&resUnit[i]<=nowScrollPos){st=i*25;ed=st+25;break} | |
82 | 114 | } |
83 | 115 | } |
84 | -} | |
85 | -var regIMG=new RegExp(".*?\\s.*?\\s.*:.*?\\sIMG:(.*?)(\\s|$)"); // æàÂ\ɵÄÝé | |
86 | -function getIMG(obj){ | |
87 | - if(regIMG.test(obj.innerText)){ | |
88 | - var filename=RegExp.$1; | |
89 | - var tmp=filename.match(/(\d\d\d\d)(\d\d\d\d)(\d\d)/); | |
90 | - var fileurl="http://up01.2ch.io/_img/"+RegExp.$1+"/"+RegExp.$1+RegExp.$2+"/"+RegExp.$3+"/"+filename; | |
91 | - return(fileurl) | |
92 | - }else{return(false)} | |
93 | -} | |
94 | -//==========¼OEIDõ | |
95 | -// IDÌõEí | |
96 | -function searchID(obj){ | |
97 | - var singleColor=event.altKey; | |
98 | - var decoy=obj.parentElement ? obj.parentElement : obj; | |
99 | - var reg=getID(obj); | |
100 | - if(!decoy.id.match(/^COLOR/)){ | |
101 | - if(!idHash[reg]){return} | |
102 | - var target=new Array();target=idHash[reg].split(" "); | |
103 | - // J[Ið | |
104 | - var c = singleColor ? 0 : selectColor(); | |
105 | - if (c=="restart"){c=0;singleColor=true} | |
106 | - else if(c=="exit"){return;} | |
107 | - // õ | |
108 | - for(i in target){var dt=getDTfromAnc(target[i]);activate(dt,c);} | |
109 | - foundReturn(target); | |
110 | - }else{ | |
111 | - clearResult(obj);return; | |
116 | + // »ÝÌÍÍà©çEBhEÌ^ñ ½èÉ\¦µÄéXðæ¾i±±Å F·éÆA25XPÊÌØÖÉXª F³êÈ¢j | |
117 | + var dtIdx=0; //if(cp){cp.childNodes[1].value=(st+1)+"-"+(ed+1);cp.style.visibility="visible";} | |
118 | + for(var i=st;i<=ed;i++){if(!dts[i+1]){dtIdx=ed;break;} | |
119 | + if(dts[i+1].offsetTop>nowScrollPos && dts[i].offsetTop<=nowScrollPos){dtIdx=i;break;} | |
120 | + } | |
121 | + // dtIdx©ç»ÌüÓðÁè | |
122 | + var start=dtIdx-5;var end=dtIdx+5;// | |
123 | + for(var i=start;i<=end;i++){ | |
124 | + if(dts[i]){setSearchColor(dts[i])} | |
112 | 125 | } |
113 | 126 | } |
114 | -// ID|bvAbv | |
115 | -function searchPopup(obj){ | |
116 | - var objs=document.getElementsByTagName(obj.tagName); | |
117 | - var reg=getID(obj);if(!reg){return} | |
118 | - var target=idHash[reg].split(" "); | |
119 | - if(target.length==1){return} | |
120 | - if(!obj.rel){obj.rel=obj.href;} obj.href="decoy:"; | |
121 | - var targetString=""; for(i in target){targetString+=returnString(target[i])} //gÌØèoµ | |
122 | - if(targetString){popup(targetString);}else{obj.href=obj.rel;} //ÎÛª¶Ýµ½çrelÉÞðµÄ|bvAbv | |
127 | +// IDHashArefHashð³É F | |
128 | +function setSearchColor(dt){ | |
129 | + if(!dt.innerText){return} | |
130 | + // ID | |
131 | + var span=dt.lastChild; var t=getID(span);//alert(t +"&&"+ idHash[t] +"&&"+ span); | |
132 | + if (browser=="zbg]kQ"){span=span.lastChild} | |
133 | + else if(browser=="A Bone") {span=span.childNodes[1]} | |
134 | + if(t && idHash[t] && span){ | |
135 | + var idResult=idHash[t].split(" "); if(t.match(/\?\?\?/)){idResult="";idHash[t]="";} | |
136 | + if (idResult.length>=threshold3[0]){span.style.color=threshold3[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
137 | + else if(idResult.length>=threshold2[0]){span.style.color=threshold2[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
138 | + else if(idResult.length>=threshold1[0]){span.style.color=threshold1[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
139 | + else if(idResult.length==1){span.title="¯êIDÍ\n èܹñ"} | |
140 | + } | |
141 | + // ref | |
142 | + var numA=dt.firstChild; var num=numA.innerText; | |
143 | + if(refHash[num]){ | |
144 | + var refResult=refHash[num].split(" "); | |
145 | + if (refResult.length>=threshold6[0]){numA.style.color=threshold6[1];dt.title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
146 | + else if(refResult.length>=threshold5[0]){numA.style.color=threshold5[1];dt.title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
147 | + else if(refResult.length>=threshold4[0]){numA.style.color=threshold4[1];dt.title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
148 | + else{numA.title="±êÖÌXÍÈ¢Íl"} | |
149 | + } | |
123 | 150 | } |
124 | -// ¼OÌõEí | |
125 | -function search(obj){ | |
126 | - var singleColor=event.altKey; | |
127 | - var objs=document.getElementsByTagName(obj.tagName); | |
128 | - var reg=obj.innerText; var target="objs[i].innerText"; //¼OEgbv | |
129 | - var decoy=obj.parentElement ? obj.parentElement : obj; | |
130 | - if(!decoy.id.match(/^COLOR/)){ | |
131 | - // J[Ið | |
132 | - var c = singleColor ? 0 : selectColor(); | |
133 | - if (c=="restart"){c=0;singleColor=true} | |
134 | - else if(c=="exit"){return;} | |
135 | - // õ | |
136 | - var found=new Array; var l=objs.length; | |
137 | - for(var i=l;i--;){ | |
138 | - var dt=objs[i].parentElement; if(dt.parentElement.className=="refResult"){continue} // tQÆàÌDTÈçñð | |
139 | - if(eval(target)==reg){activate(dt,c);found.unshift(dt.firstChild.innerText);} | |
140 | - else if(singleColor) {deactivate(dt)} | |
151 | +//==========¼OEIDõ | |
152 | +function searchPerson(obj){ | |
153 | + var by,thisDT,reg; | |
154 | + if (obj.tagName=="DT") {by="ID"; thisDT=obj; reg=getID(obj)} | |
155 | + else if(obj.tagName=="SPAN"){by="ID"; thisDT=obj.parentElement;reg=getID(obj)} | |
156 | + else if(obj.tagName=="U") {by="NAME";thisDT=obj.parentElement; reg=obj.innerHTML.replace(/<B>(.*?)<\/B>/ig,"");if(!reg){reg=RegExp.$1.replace(/<.*?A.*?>/ig,"")}/*¼Oª*/} | |
157 | + else if(obj.tagName=="B") {by="NAME";thisDT=obj.parentElement.parentElement;reg=obj.innerText} | |
158 | + else{return} | |
159 | + if(!thisDT.rel){ | |
160 | + var c=selectColor("res"); if(!c){return} var color=new Array(c); // J[Ið | |
161 | + if(by=="ID"){ | |
162 | + if(!reg || !idHash[reg]){return} // IDȵAID:???A{¶Ì¼XÌRsyID | |
163 | + // õnbV ÉlðÝèµÄA»êÉîëX F | |
164 | + foundRes[c]=idHash[reg].split(" "); foundRes[c].word="ID:"+reg; | |
165 | + for(i in foundRes[c]){var dt=getDTfromAnc(foundRes[c][i]);toggleResColor(dt,c);} | |
166 | + }else{ | |
167 | + var us=document.getElementsByTagName("U"); var l=us.length; | |
168 | + var regName=new RegExp();regName.compile(reg); | |
169 | + // [vÉX FElÌÝèð¯Às | |
170 | + for(var i=l;i--;){var dt=us[i].parentElement; | |
171 | + if(dt.parentElement.className=="refResult"){continue} // tQÆàÌDTÈçñð | |
172 | + if(regName.test(us[i].innerText)){toggleResColor(dt,c);foundRes[c].unshift(dt.firstChild.innerText);} | |
173 | + } | |
174 | + foundRes[c].word=reg; | |
141 | 175 | } |
142 | - foundReturn(found); | |
176 | + returnFound("res",color); | |
143 | 177 | }else{ |
144 | - clearResult(obj);return; | |
178 | + clearColor("res",thisDT.style.backgroundColor); | |
145 | 179 | } |
146 | 180 | } |
147 | - | |
148 | 181 | // ID¶ñÌo |
149 | -//var regID=new RegExp("ID:(.*)$"); | |
150 | -var regID=new RegExp(".*?\\s.*?\\s.*:(.*?)(\\s|$)"); // HOSTâçµ½çÎàÂ\ɵÄÝé | |
151 | -function getID(obj){ | |
152 | - if(regID.test(obj.innerText)){return(RegExp.$1)}else{return(false)} | |
182 | +var regID=new RegExp(); // HOSTàÂ\ɵÄÝé | |
183 | +regID.compile(".*?\\s.*?\\s.*:(.*?)(\\s|$)"); // 1000resÅ0.02bÙǬ | |
184 | +function getID(span){ | |
185 | + if(regID.test(span.innerText)){return(RegExp.$1)}else{return(false)} | |
153 | 186 | } |
154 | -// FÝè | |
155 | -function activate(obj,c){ | |
156 | - var color=foundColor[c]; | |
157 | - obj.rev=obj.style.backgroundColor; | |
158 | - obj.style.backgroundColor=color; | |
159 | - obj.id="COLOR"+c; // ¯êidª¡¶¶éªByNameÅÍdtÌname©çæ¾Å«È¢½ßâÞȵ | |
187 | +//==========FÝèð | |
188 | +// IuWFNgÌú» | |
189 | +function createHash(name,key,arr,word){ | |
190 | + name[key]=arr?arr:new Array(); | |
191 | + name[key].word=word?word:""; | |
192 | + name[key].justMovedRes=undefined; | |
160 | 193 | } |
161 | -// FA | |
162 | -function deactivate(obj){if(!obj){return} | |
163 | - obj.style.backgroundColor=obj.rev; | |
164 | - if(obj.id!="sizeinfo"){obj.removeAttribute("id");} | |
165 | - obj.removeAttribute("rev"); | |
166 | - obj.removeAttribute("title"); | |
194 | +// FIð(YXÔzñð½È¢L[ðÔ·) | |
195 | +function selectColor(type){ | |
196 | + if(!foundRes) {foundRes =new Array();for(var i in foundResColor) {createHash(foundRes,foundResColor[i]);}} // Hash foundRes ={F:YXÔzñ} | |
197 | + if(!highlight){highlight=new Array();for(var i in highlightColor){createHash(highlight,highlightColor[i]);}} // Hash hightLight={F:YXÔzñ} | |
198 | + var cHash,cArray,cMess; | |
199 | + if(type=="res"){cHash=foundRes; cArray=foundResColor; cMess="¡ÜÅÌX FððµÜ·©H";} | |
200 | + else {cHash=highlight;cArray=highlightColor;cMess="¡ÜÅÌnCCgððµÜ·©H";} | |
201 | + var i=0; while(cHash[cArray[i]].word){ | |
202 | + i++; if(i==cArray.length){if(confirm(cMess)){clearColor(type);i=0;break}else{i=null;break}} | |
203 | + } | |
204 | + return(cArray[i]); | |
167 | 205 | } |
168 | -// J[Ið | |
169 | -function selectColor(){ | |
170 | - var c=0; | |
171 | - while(document.getElementById("COLOR"+c)){ | |
172 | - c++; | |
173 | - if(!foundColor[c]){if(confirm("Fðú»µÜ·©H")){return("restart")}else{return("exit")}} | |
206 | +// FðinbV AÎÛAfoundPanelj | |
207 | +function clearColor(type,color){ | |
208 | + var cHash=(type=="res")?foundRes:highlight; | |
209 | + if(event && event.altKey){color=""} | |
210 | + for(var i in cHash){ | |
211 | + if(type=="res"){ | |
212 | + if(color && i!=color){continue} // wèFÅȯêÎX[ | |
213 | + for(var j in cHash[i]){ | |
214 | + if(event.srcElement.value=="DEL"){removeRes(getDTfromAnc(cHash[i][j]))}else{toggleResColor(getDTfromAnc(cHash[i][j]))} | |
215 | + } | |
216 | + cHash[i]=new Array(); | |
217 | + document.getElementById("c"+i).removeNode(true); | |
218 | + }else{ | |
219 | + var strongs=document.getElementsByTagName("STRONG"); | |
220 | + var reg=new RegExp(i); | |
221 | + if(!color.match(i)){continue} // wèFÅȯêÎX[ | |
222 | + for(var j=0;j<strongs.length;j++){ | |
223 | + if(strongs[j].style.backgroundColor==i){ | |
224 | + if(event.srcElement.value=="DEL"){removeRes(strongs[j].parentElement.previousSibling);j--}else{strongs[j].removeNode(false);j--} | |
225 | + } | |
226 | + } | |
227 | + cHash[i]=new Array(); | |
228 | + if(document.getElementById("c"+i)){document.getElementById("c"+i).removeNode(true);} // and,orõÅPFÚÌÝ | |
229 | + } | |
174 | 230 | } |
175 | - return(c); | |
231 | + if(!fp.hasChildNodes()){fp.style.visibility="hidden";searched=false;} | |
176 | 232 | } |
177 | -// Ê\¦ | |
178 | -function foundReturn(found){ | |
179 | - if(!fR){document.body.insertAdjacentHTML('afterBegin','<div id="foundResult"></div>');fR=document.getElementById("foundResult");} | |
180 | - //dtÌtitleÉ | |
181 | - for(var i=found.length;i--;){dt=getDTfromAnc(found[i]);dt.title=found.join(" ");} | |
182 | - //foundResultÉ | |
183 | - var buttons='<input type="button" value="CLR" onclick="clearResult(this)" title="Altº\n FXSÄ"><input type="button" value="DEL" onclick="clearResult(this)" title="Altº\n FXSÄ">'; | |
184 | - if(found.length>=20 && confirm("20Èã é¯Ç\¦·éH")==false){ | |
185 | - fR.innerHTML=buttons; fR.title=found.join(" "); | |
233 | +// XFgO | |
234 | +function toggleResColor(dt,c){ | |
235 | + if(!dt){return} // for-inÅçêéÔÈOÌobjÈçI¹ | |
236 | + if(c){ | |
237 | + dt.rev=dt.style.backgroundColor; | |
238 | + dt.rel="colored"; | |
239 | + dt.id ="COLOR"+c.replace(/#/,""); | |
240 | + dt.style.backgroundColor=c; | |
186 | 241 | }else{ |
187 | - for(var i=0;i<found.length;i++){found[i] = addAnchor(found[i],found[i])} | |
188 | - fR.innerHTML=found.join(" ")+buttons; | |
242 | + dt.style.backgroundColor=dt.rev; | |
243 | + if(dt.id.match(/COLOR/)){dt.removeAttribute("id")}//else{alert("dtÉCOLOR***ÈOÌidi"+dt.id+"jªÝè³êĢܷ")} | |
244 | + dt.removeAttribute("rev"); | |
245 | + dt.removeAttribute("rel"); | |
189 | 246 | } |
190 | - fR.style.visibility="visible"; | |
191 | 247 | } |
192 | -// ÊÁAÊí | |
193 | -function clearResult(obj){ | |
194 | - var fromObj=obj.parentElement; | |
195 | - var singleColor=event.altKey; | |
196 | - var result=new Array();var arrayElement; var numbers=fromObj.title ? fromObj.title : fromObj.innerText; | |
197 | - if(singleColor){result=dts; arrayElement="result[i]";} | |
198 | - else {result=numbers.split(" ");arrayElement="getDTfromAnc(result[i])";} | |
199 | - var l=result.length; | |
200 | - if(!result[0]){ | |
201 | - /* õÊ[ÅàresultªnullÉÈçÈ¢Îô */ | |
202 | - }else if(event.srcElement.value!="DEL"){ | |
203 | - for(var i=l;i--;){ | |
204 | - var dt=eval(arrayElement); | |
205 | - deactivate(dt); | |
206 | - } | |
248 | +// õÊÉîëÁ | |
249 | +function removeRes(dt){if(!dt){return} // cHash[i][j]=ID:xxxxxxxxÌÆ« | |
250 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} // LiveÌÝ-§¾ Ú`ñ | |
251 | + dt.nextSibling.removeNode(true);dt.removeNode(true); | |
252 | +} | |
253 | +//==========Ê\¦ | |
254 | +// XÔXgi|bvAbvAJ[ðÜÞj | |
255 | +function returnFound(type,color){ | |
256 | + var cHash=(type=="res")?foundRes:highlight; | |
257 | + var nDIV="";var numArray=cHash[color[0]]; var display=new Array(["none","POP"],["inline","LST"]); | |
258 | + if(searchView=="resPopup" || numArray.length>=listLimit){display=display.reverse();} | |
259 | + // |bvAbv | |
260 | + var nTT="";for(var i=0;i<color.length;i++){nTT+='<tt style="background-color:'+color[i]+'"> '+cHash[color[i]].word+'</tt>';} | |
261 | + nDIV+='<span rel="'+type+'" style="display:'+display[0][0]+'">'+nTT+'</span>'; | |
262 | + // Xg | |
263 | + var nA="";for(var i=0;i<numArray.length;i++){nA+=addAnchor(numArray[i],numArray[i])+" "} | |
264 | + nDIV+='<tt style="background-color:'+color[0]+'" style="display:'+display[1][0]+'"> '+nA+'</tt>'; | |
265 | + // Â | |
266 | + nDIV+=' '+numArray.length+' '; | |
267 | + var buttons='<input type="button" value="'+display[0][1]+'" onclick="changeSearchView();blur()"><input type="button" value="É" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="ºÖõ"><input type="button" value="È" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="ãÖõ"><input type="button" value="CLR" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Altº\n FXSÄ"><input type="button" value="DEL" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Altº\n FXSÄ">'; | |
268 | + fp.innerHTML+='<div id="c'+color[0]+'">'+nDIV+buttons+'</div>'; | |
269 | + fp.style.visibility="visible";searched=true; | |
270 | +} | |
271 | +// ÎÛXÉWv | |
272 | +var markedDT; | |
273 | +function moveToSearchRes(type,color){ | |
274 | + if(color.match(/(.*?),/)){color=RegExp.$1} | |
275 | + var scope = (event && event.srcElement.value=="È") ? false : true ; | |
276 | + var numArray= (type=="res") ? foundRes[color] : highlight[color]; | |
277 | + if(isNaN(numArray.justMovedRes)){numArray.justMovedRes=0} | |
278 | + else{ | |
279 | + markedDT.style.borderColor="#999"; | |
280 | + if(scope){numArray.justMovedRes++;if(numArray.justMovedRes>=numArray.length){numArray.justMovedRes--;alert("±êæèºÉÍ èܹñ")}} | |
281 | + else {numArray.justMovedRes--;if(numArray.justMovedRes<0){numArray.justMovedRes++;alert("±êæèãÉÍ èܹñ")}} | |
282 | + } | |
283 | + markedDT=getDTfromAnc(numArray[numArray.justMovedRes]); markedDT.style.borderColor="red"; | |
284 | + markedDT.scrollIntoView(true); | |
285 | + setTimeout('markedDT.style.borderColor="#999"',5000); | |
286 | +} | |
287 | +// |bvAbvÆXg\¦ØèÖ¦ | |
288 | +function changeSearchView(){ | |
289 | + var e=event.srcElement; | |
290 | + if(e.value=="POP"){ | |
291 | + e.value="LST"; | |
292 | + e.parentElement.childNodes[0].style.display="inline"; | |
293 | + e.parentElement.childNodes[1].style.display="none"; | |
207 | 294 | }else{ |
208 | - for(var i=l;i--;){ | |
209 | - var dt=eval(arrayElement); var dd=dt.nextSibling; | |
210 | - //Live@\ÇÁ - §¾ Ú`ñ | |
211 | - if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
212 | - dt.removeNode(true); dd.removeNode(true); | |
213 | - } | |
295 | + e.value="POP"; | |
296 | + e.parentElement.childNodes[0].style.display="none"; | |
297 | + e.parentElement.childNodes[1].style.display="inline"; | |
214 | 298 | } |
215 | - if(fR){fR.innerText="";fR.style.visibility="hidden";} | |
216 | 299 | } |
217 | 300 | |
218 | 301 | //==========Pêõ |
219 | -function findIt(word){ | |
220 | - if(!word){ | |
221 | - var word = prompt("õ·é¶ðü͵ľ³¢B",""); | |
222 | - word = unescape(escape(word).split("%00")[0]); //IE5ÌoOÎô | |
302 | +function findIt(arg){createSearchPanel(arg);} | |
303 | +var searchWindow=null; | |
304 | +// õEBhEÌ\¦ | |
305 | +function createSearchPanel(arg){ // êpuEUÅÌmodelessDialogÖÌOÇÝÝÅÍAdialogArgumentsªêÈ¢Ìżګo· | |
306 | + if(arg){word=arg} | |
307 | + if(searchWindow && !searchWindow.closed){return} | |
308 | + var skinPath=document.getElementsByName("SkinPath")[0].content; | |
309 | + searchWindow=showModelessDialog("",window,'dialogWidth:500px;dialogHeight:200px;dialogTop:0px;dialogLeft:0px;help:no;resizable:yes;status:no;unadorned:yes;'); | |
310 | + var nWin='<html><head><title>PêÌõ<\/title>' | |
311 | + +'<script type="text/javascript">function submitEvent(){var fo=document.forms[0]; dialogArguments.word=fo.word.value; var i=-1;do{i++;dialogArguments.expression =fo.expression[i].value;}while(!fo.expression[i].checked); var i=0; while(fo.searchTarget[i]){dialogArguments.searchTarget[fo.searchTarget[i].value]=fo.searchTarget[i].checked;i++;} var i=-1;do{i++;dialogArguments.searchView =fo.searchView[i].value;}while(!fo.searchView[i].checked); dialogArguments.searchWord();}</script>' | |
312 | + +'<style type="text/css">body{background:ThreeDFace;padding:0.5em;overflow:auto} fieldset{padding:0.5em;margin-top:0.5em;} legend,label,input{font:message-box;}</style>' | |
313 | + +'<\/head><body onunload="unloadEvent()"><form onsubmit="submitEvent();return false;"><table width="100%"><tr><td valign="top" colspan="3">' | |
314 | + +'<label for="word">õ¶ñF</label><input type="text" name="word" id="word" size="50" value="'+word+'" tabindex="0"><br>' | |
315 | + +'</td><td align="right" valign="top" rowspan="2">' | |
316 | + +'<input type="submit" name="submit" value="@@õ@" tabindex="7"><br><br><input type="button" name="cancel" value="LZ" onclick="window.close()" tabindex="8">' | |
317 | + +'</td></tr><tr valign="top">' | |
318 | + +'<td><fieldset><legend>õû@</legend><input type="radio" name="expression" value="default" id="tDef" tabindex="1"> <label for="tDef">Êíõ</label><br><input type="radio" name="expression" value="regExp" id="tReg"> <label for="tReg">³K\»</label><br><input type="radio" name="expression" value="multiAND" id="tAND"> <label for="tAND">ANDõ</label><br><input type="radio" name="expression" value="multiOR" id="tOR"> <label for="tOR">ORõ</label></fieldset></td>' | |
319 | + +'<td><fieldset><legend>õÎÛ</legend><input type="checkbox" name="searchTarget" value="name" id="tName" tabindex="2" checked> <label for="tName">¼O</label><br><input type="checkbox" name="searchTarget" value="mail" id="tMail" tabindex="3" checked> <label for="tMail">[</label><br><input type="checkbox" name="searchTarget" value="id" id="tID" tabindex="4" checked> <label for="tID">útÆID</label><br><input type="checkbox" name="searchTarget" value="mess" id="tMess" tabindex="5" checked> <label for="tMess">{¶</label></fieldset></td>' | |
320 | + +'<td><fieldset><legend>Ê\¦</legend><input type="radio" name="searchView" value="resList" id="rList" tabindex="6"> <label for="rList">XÔð\¦</label><br><input type="radio" name="searchView" value="resPopup" id="rPop"> <label for="rPop">Xð|bvAbv</label><br><input type="radio" name="searchView" value="resJump" id="rJump"> <label for="rJump">XÖWv</label></fieldset></td>' | |
321 | + +'</tr></table></form><\/body><\/html>'; | |
322 | + searchWindow.document.write(nWin); | |
323 | + sdf=searchWindow.document.forms[0]; sdf.elements[0].select(); | |
324 | + var ex=sdf.expression;for(var i=0;i<ex.length;i++){if(ex[i].value==expression){ex[i].checked=true}} | |
325 | + var sv=sdf.searchView;for(var i=0;i<sv.length;i++){if(sv[i].value==searchView){sv[i].checked=true}} | |
326 | + range=document.body.createTextRange(); | |
327 | +} | |
328 | +// õC | |
329 | +var word="";var range;var searchTarget={"word":true}; | |
330 | +function searchWord(){ | |
331 | + if(!word){return} | |
332 | + var matchs=new Array(); var color=new Array(); | |
333 | + // õû@ | |
334 | + if(expression=="regExp" || expression=="default" || (expression.match(/multi/) && !word.match(/\s/))){ // AND/ORÅêPêÈçdefaultÅõ | |
335 | + // õêwèid¡rŬ»Hj | |
336 | + if(expression=="regExp"){ | |
337 | + var regWord=word.replace(/[\^\$]/g,""); | |
338 | + var reg=new RegExp(regWord,"g"); var tmpArr=range.text.match(reg); var tmp; | |
339 | + if(!tmpArr || !tmpArr.length){tmpArr=new Array(tmpArr)} // õÊ0or1ÈçAzñì¬ | |
340 | + tmpArr.sort();for(var i=0;i<tmpArr.length;i++){if(tmp!=tmpArr[i]){matchs.push(tmpArr[i])}tmp=tmpArr[i]} | |
341 | + if(!matchs || !matchs.length){matchs[0]=word} // õÊ0or1ÈçAzñì¬ | |
342 | + }else{matchs[0]=word} | |
343 | + // nCCg | |
344 | + for(var i=0;i<matchs.length;i++){color.push(setHighlight(matchs[i]));} | |
345 | + highlight[color[0]].word=word; | |
346 | + }else{ | |
347 | + // õêwè | |
348 | + var matchs=word.split(" "); var tmpArr=new Array(); var tmp; | |
349 | + // nCCg¨d¡ | |
350 | + for(var i=0;i<matchs.length;i++){ | |
351 | + color.unshift(setHighlight(matchs[i])); | |
352 | + highlight[color[0]].word=matchs[i]; | |
353 | + tmpArr=tmpArr.concat(highlight[color[0]]) | |
354 | + } | |
355 | + color.reverse();tmpArr.sort();createHash(highlight,color[0],"",matchs[0]); // êUú» | |
356 | + var judge = (expression=="multiAND") ? "tmp==tmpArr[i]" : "tmp!=tmpArr[i]"; | |
357 | + for(var i=0;i<tmpArr.length;i++){if(eval(judge)){highlight[color[0]].push(tmpArr[i])}tmp=tmpArr[i]} // õÊÍhighlight[color[0]]Éüêé | |
223 | 358 | } |
224 | - if(!word || word=="null"){return} | |
359 | + // Ê\¦ | |
360 | + if (searchView=="resList") {returnFound("search",color);searchWindow.close();} | |
361 | + else if(searchView=="resPopup"){returnFound("search",color);searchWindow.close();} | |
362 | + else if(searchView=="resJump") {returnFound("search",color);searchWindow.close();if(highlight[color[0]].length){moveToSearchRes("search",color.join(","))}} | |
363 | +} | |
364 | +// nCCgõ | |
365 | +function setHighlight(reg){ | |
225 | 366 | // J[Ið |
226 | - var singleColor=event.altKey; | |
227 | - var c = singleColor ? 0 : selectColor(); | |
228 | - if (c=="restart"){c=0;singleColor=true} | |
229 | - else if(c=="exit"){return;} | |
367 | + var c=selectColor("highlight"); if(!c){return} | |
230 | 368 | // õ |
231 | - var found=new Array; var l=dds.length; | |
232 | - var bodyText=document.body.createTextRange(); | |
233 | - for(var i=l;i--;){ | |
234 | - var dt=dts[i]; var dd=dds[i]; if(dt.parentElement.className=="refResult"){continue} // tQÆàÌDTÈçñð | |
235 | - bodyText.moveToElementText(dt); var checkDT=bodyText.findText(word,0); | |
236 | - bodyText.moveToElementText(dd); var checkDD=bodyText.findText(word,0); | |
237 | - if(checkDT || checkDD){activate(dt,c);found.unshift(dt.firstChild.innerText)} | |
238 | - else if(singleColor) {deactivate(dt);} | |
369 | + while(range.findText(reg)){ | |
370 | + var dt=range.parentElement();var tag=dt.tagName; var thisRange; | |
371 | + // õÎÛÅièÝ | |
372 | + if(tag=="B"||tag=="U"){thisRange="name"} | |
373 | + else if(tag=="DT") {thisRange="mail"} | |
374 | + else if(tag=="SPAN") {thisRange="id"} | |
375 | + else if(tag=="DD" || tag=="A" && dt.parentElement.tagName=="DD"){thisRange="mess"} | |
376 | + else if(tag=="STRONG"){thisRange="word"} | |
377 | + else{/*alert("tagF"+tag+"\ndt:"+dt.outerHTML);*/range.collapse(false);continue;} // XÔ(A)âõÊ©Ì(TT) | |
378 | + if(!searchTarget[thisRange]){range.collapse(false);continue;} | |
379 | + // ³K\»ÌÊuwèqª éêAïÜvfàÅÄõ | |
380 | + if(expression=="regExp" && word.match(/[\^|\$]/)){ | |
381 | + var thisReg=new RegExp(word); var targetText=(tag=="STRONG") ? dt.parentElement.innerText : dt.innerText; | |
382 | + if(!targetText.match(thisReg)){range.collapse(false);continue} | |
383 | + } | |
384 | + // dt澨XÔ澨nCCg | |
385 | + if(dt.tagName!="DT"){ | |
386 | + while(dt.tagName!="DT" && dt.tagName!="DD"){dt=dt.parentElement} | |
387 | + if(dt.tagName=="DD"){dt=dt.previousSibling} | |
388 | + } | |
389 | + var num=dt.firstChild.innerText; | |
390 | + if(dt.parentElement.className!="refResult" && num!=highlight[c][highlight[c].length-1]){highlight[c].push(num)} // tQÆàÌDT,¯êÔÈçñð | |
391 | + range.pasteHTML('<strong style="background-color:'+c+'">'+range.text+'</strong>'); | |
392 | + range.collapse(false); | |
239 | 393 | } |
240 | - if(found){foundReturn(found)} | |
394 | + range=document.body.createTextRange(); // Wð³ÉߵĨ | |
395 | + return(c); | |
241 | 396 | } |
242 | 397 | //==========tQÆ |
243 | 398 | function searchRef(obj){ |
@@ -245,16 +400,7 @@ function searchRef(obj){ | ||
245 | 400 | var num=obj.firstChild.innerText; |
246 | 401 | if(refHash[num]){ |
247 | 402 | var refArr=refHash[num].split(/\s/); var refs=""; |
248 | - for(var i=0;i<refArr.length;i++){ | |
249 | - var dtOrg=getDTfromAnc(refArr[i]); var dt=dtOrg.cloneNode(true); var dd=dtOrg.nextSibling.cloneNode(true); | |
250 | - // {¶ÈOðí | |
251 | - if(dd.lastChild){ | |
252 | - if(dd.lastChild.tagName=="DL"){dd.lastChild.removeNode(true);} //tQÆÌ | |
253 | - if(dd.lastChild.name){dd.lastChild.removeNode(true);} // LABELNUMBERªÈ¢àÌÉWésvAJ[Ì | |
254 | - } | |
255 | - // {¶ði[ | |
256 | - refs+=dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,""); | |
257 | - } | |
403 | + for(var i=0;i<refArr.length;i++){refs+=returnString(refArr[i]);} | |
258 | 404 | obj.nextSibling.insertAdjacentHTML("beforeEnd",'<dl class="refResult">'+refs+'</dl>') |
259 | 405 | obj.name="referred"; |
260 | 406 | } |
@@ -282,9 +428,26 @@ function getDTfromAnc(num){ | ||
282 | 428 | var anc=ancs(anchorHead+num); |
283 | 429 | if(!anc){return("")} //LABELNUMBERÎÌ Ú`ñáµÍ¢oÔÈçI¹ |
284 | 430 | var obj=anc.parentElement; //LABELNUMBERÎÌàÌ |
431 | + if(!obj || !obj.tagName){return false;} | |
285 | 432 | if(obj.tagName!="DT"){ //LABELNUMBERñÎÌàÌ |
286 | 433 | if(num==1){if(anc){obj=anc.nextSibling} else{return("")}} |
287 | 434 | else {if(!anc.nextSibling){obj=anc.parentElement.nextSibling}else{return("")}} |
288 | 435 | } |
289 | 436 | return(obj); |
290 | -} | |
\ No newline at end of file | ||
437 | +} | |
438 | + | |
439 | +// æÂÖA | |
440 | +var regIMG=new RegExp(".*?\\s.*?\\s.*:.*?\\sIMG:(.*?)(\\s|$)"); // æàÂ\ɵÄÝé | |
441 | +function getIMG(obj){ | |
442 | + if(regIMG.test(obj.innerText)){ | |
443 | + var filename=RegExp.$1; | |
444 | + var tmp=filename.match(/(\d\d\d\d)(\d\d\d\d)(\d\d)/); | |
445 | + var today=new Date();var last=new Date(today-7*24*60*60*1000);var date=""; | |
446 | + date+=last.getMonth()<9 ? "0"+(last.getMonth()+1) : last.getMonth()+1; | |
447 | + date+=last.getDate()<10 ? "0"+last.getDate() : last.getDate(); | |
448 | + var log= (RegExp.$1+""+RegExp.$2 < last.getYear()+""+date) ? "_kako/" : "_img/"; | |
449 | + var fileurl="http://up01.2ch.io/"+log+RegExp.$1+"/"+RegExp.$1+RegExp.$2+"/"+RegExp.$3+"/"+filename; | |
450 | + return(fileurl) | |
451 | + }else{return(false)} | |
452 | +} | |
453 | + |
@@ -15,7 +15,7 @@ | ||
15 | 15 | var start_time = new Date(); |
16 | 16 | //==========O[oÏ |
17 | 17 | var anchorHead=""; |
18 | -var skinName="skin30-3 v3.5.0704"; | |
18 | +var skinName="skin30-3 v3.6.1231"; | |
19 | 19 | var browser="MRir"; |
20 | 20 | //==========MRirpAJ[Ì»èi0:³µ,1:|bvAbv,2:{^}üj |
21 | 21 | // MRirÅÍAXAJ[ÍÎAhXÅLq³êé |
@@ -47,6 +47,16 @@ function threadurl(){ | ||
47 | 47 | t_bbs=RegExp.$1; |
48 | 48 | t_key=RegExp.$2; |
49 | 49 | } |
50 | +//==========ñ\¦XÌ\¦-MRirÌÝ | |
51 | +function hiddenRes(e){ | |
52 | + var number=tohan(event.srcElement.innerText.replace(/>|/g,"")); | |
53 | + var i=0;while(document.anchors[i].name.match(/\D/)){i++} | |
54 | + var startRes=parseInt(document.anchors[i+1].name.replace(/\D/g,"")); | |
55 | + if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1);} | |
56 | + else {var start=parseInt(number);} | |
57 | + //alert(startRes+">"+start+" && "+start+"!="+1); | |
58 | + if(startRes>start && start!=1){return true}else{return false} | |
59 | +} | |
50 | 60 | </script> |
51 | 61 | </head> |
52 | 62 | <body> |
@@ -7,8 +7,11 @@ dt a{text-decoration:none;} | ||
7 | 7 | dd a{text-decoration:underline;line-height:1.1} |
8 | 8 | |
9 | 9 | /* õÊ */ |
10 | -#foundResult a {color:LightSlateGray;} | |
11 | -#foundResult a:hover{color:#000;} | |
10 | +#foundPanel{color:LightSlateGray;} | |
11 | +#foundPanel div {font-family:"lr SVbN";} | |
12 | +#foundPanel div span{font-family:Times;cursor:hand;} | |
13 | +#foundPanel a {color:LightSlateGray;} | |
14 | +#foundPanel a:hover{color:#000;} | |
12 | 15 | |
13 | 16 | /* dt */ |
14 | 17 | dt{ |
@@ -1,18 +1,22 @@ | ||
1 | +//========V WvÝè | |
2 | +var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
3 | +var newResJump=1; // V XWvi0:uEUC¹A1:ǹÌÝA2:íj©¿ãAOpenJaneAtwintailÌÝÌÝè | |
4 | +//==========ȺÍXNvg{¶Å·æB | |
1 | 5 | //Cxgnhè` |
2 | 6 | //OÖFtohan |
3 | 7 | //OÏFanchorHead,lightmode,getID,skinName,browser,dts |
4 | -//O[oÏ | |
5 | -var buffer=1; // á¬ñüâá¬}VÌêÉÍbufferÌlðâ·Ææè³mÉWvi1â·Æ0.1bxêéj | |
6 | -var newResJump=1; // V XWvi0:uEUC¹A1:ǹÌÝA2:íj©¿ãAOpenJaneAtwintailÌÝÌÝè | |
8 | +//=========Ot@C¤pÌO[oÏ | |
9 | +var waited=false;//command\¦ãtrueɵAIðãÉfalseÉ·éB | |
10 | +var viewed=false;//thumbÇÝãtrueɵAthumbPanelÉæ~ãfalseÉ·éB | |
11 | +var searched=false; //õãÉAtrueɵAfoundPanelÉæ~ãfalseÉ·éB | |
12 | +var cp,tp,vp,fp; | |
7 | 13 | //========Click¨search,¼ |
8 | 14 | document.onclick = clickEvent; |
9 | 15 | function clickEvent(){ |
10 | 16 | if(clickCancel){return false}else{clearTimeout(clickTimer);if(document.getElementById("context")){document.getElementById("context").removeNode(true);}} |
11 | 17 | var obj=window.event.srcElement; |
12 | 18 | var tag=obj.tagName; |
13 | - if (tag=="B") {search(obj.parentElement)} //¼O | |
14 | - else if(tag=="U") {search(obj)} //gbv | |
15 | - else if(tag=="SPAN"){if(getID(obj)){searchID(obj)}} //ID | |
19 | + if(tag=="B"||tag=="U"||tag=="SPAN"){searchPerson(obj)} //¼O,gbv,ID | |
16 | 20 | else if(tag=="DT") {searchRef(obj)} |
17 | 21 | else if(tag=="DD") {defaultPopup()} |
18 | 22 | else if(tag=="A"){ |
@@ -23,7 +27,7 @@ function clickEvent(){ | ||
23 | 27 | if(obj.href.match(/^http:.*#/)){window.open(obj.href,"_parent");return false} |
24 | 28 | } |
25 | 29 | //A Boneâ³iñ\¦XÌ\¦j |
26 | - if(browser=="A Bone" && hidedRes(obj)){showModelessDialog(document.getElementsByName("ThreadURL")[0].content+tohan(obj.innerText.replace(/[>]/g,"")),window,"dialogWidth:"+document.body.clientWidth+"px;help:no;resizable:yes;status:no;unadorned:yes;");window.focus();} | |
30 | + if((browser=="A Bone"||browser=="MRir") && hiddenRes(obj)){showModelessDialog(document.getElementsByName("ThreadURL")[0].content.replace(/\/l50$/,"/")+tohan(obj.innerText.replace(/[>]/g,"")),window,"dialogWidth:"+document.body.clientWidth+"px;help:no;resizable:yes;status:no;unadorned:yes;");window.focus();} | |
27 | 31 | //Jane,Live,MRirâ³iskin30-2NormalyÑMRirjXWvªscrollIntoViewÅÈ¢àÌÉWéâ³ |
28 | 32 | if(browser=="A Bone" || browser=="OpenJane" || browser=="Live2ch" || browser=="MRir"){if(obj.href.match(/^about|jumpres/)){ |
29 | 33 | var h=tohan(obj.innerText.replace(/[>]/g,"")); |
@@ -32,17 +36,17 @@ function clickEvent(){ | ||
32 | 36 | }} |
33 | 37 | return true; |
34 | 38 | } |
35 | - else{return} | |
39 | + else{panelOver();return} | |
36 | 40 | } |
37 | 41 | |
38 | 42 | //=========MouseOver¨image,popup |
39 | 43 | document.onmouseover = mouseOverEvent; |
40 | 44 | function mouseOverEvent() { |
41 | 45 | var e = window.event.srcElement; |
42 | - if(e.tagName=='B'){ | |
46 | + if(e.tagName=='B'){if(browser!="twintail2"){ | |
43 | 47 | if(e.innerText.match(/^([^\dO-X]*)([\dO-X]+)([^\dO-X]*.*)/)){namePopup(e,RegExp.$1,RegExp.$2,RegExp.$3);} |
44 | 48 | else if(e.innerText.match(/^ Ú`ñ$/)) {abonePopup(e);} |
45 | - } | |
49 | + }} | |
46 | 50 | if(e.tagName=='A'){ |
47 | 51 | if(!e.innerText.match(/%/)){ // URLGR[hŠ調È%ªÈ¯êÎ |
48 | 52 | //e.href=e.href.replace(/>/g,""); |
@@ -55,9 +59,8 @@ function mouseOverEvent() { | ||
55 | 59 | } |
56 | 60 | } |
57 | 61 | if (checkAnchor(e.href)==2){insButton(e);return;} |
58 | - else if(checkAnchor(e.href)==1){ | |
62 | + else if(checkAnchor(e.href)==1){ // ½i|bvAbv | |
59 | 63 | if(event.shiftKey){if(e.rel){e.href=e.rel}return} |
60 | - // ½i|bvAbv | |
61 | 64 | var parent=e.parentElement; |
62 | 65 | var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; |
63 | 66 | if(!document.getElementById("p"+aNum)){ |
@@ -66,49 +69,48 @@ function mouseOverEvent() { | ||
66 | 69 | if(!onPopup){removePopup()} |
67 | 70 | makePopContent(e);return; |
68 | 71 | } |
72 | + }else if(checkAnchor(e.href)==0){ // tQÆ|bvAbv | |
73 | + if(e.href.match(/menu:/) && event.shiftKey){searchPopup(e)} | |
69 | 74 | } |
75 | + }else if(e.tagName=="SPAN"||e.tagName=="TT"){ | |
76 | + var obj=e;var onPopup; | |
77 | + while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}} | |
78 | + if(e.tagName=="SPAN"){ | |
79 | + if(!onPopup && event.shiftKey){searchPopup(e)} | |
80 | + }else{searchPopup(e)} | |
70 | 81 | }else{ // ½i|bvAbvÁ |
71 | 82 | var obj=e;var onPopup; |
72 | 83 | if(obj.sourceIndex<0){obj=document.body;if(document.getElementById("popupBase")){onPopup=true;}} // namePopupÆÌ£Åm[hªOêéuÔÌñð |
73 | - while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement;}} | |
84 | + while(obj.tagName!="BODY"){if(obj.id.match(/(p\d+)/)){onPopup=true;break}else{obj=obj.parentElement;}} | |
74 | 85 | if(onPopup){while(obj.id!=obj.parentElement.lastChild.id){obj.parentElement.lastChild.removeNode(true)}} |
75 | 86 | else {removePopup()} |
76 | 87 | } |
77 | - if(e.tagName=="DT"){setHash();} | |
78 | - if(e.tagName=="SPAN"){ | |
79 | - var obj=e;var onPopup; | |
80 | - while(obj.tagName!="BODY"){if(obj.id.match(/p\d+/)){onPopup=true;break}else{obj=obj.parentElement}} | |
81 | - if(!onPopup && event.shiftKey){searchPopup(event.toElement);} return; | |
82 | - } | |
83 | 88 | } |
84 | -//=========MouseMove¨menuOver(),tpOver() | |
89 | +//=========MouseMove¨panelOver() | |
85 | 90 | document.onmousemove=mouseMoveEvent; |
86 | -var waited=false;//command\¦ãtrueɵAIðãÉfalseÉ·éB | |
87 | -var viewed=false;//thumbÇÝãtrueɵAthumbPanelÉæ~ãfalseÉ·éB | |
88 | -var cp,tp,vp; | |
89 | 91 | function mouseMoveEvent() { |
90 | 92 | if(!cp){ |
91 | - var nHTML ="<div id='controlPanel'><input type='button' value='TOP' onclick='scroll_Top();blur()'><input type='button' value='END' onclick='scroll_End();blur()'><input type='button' value='IMG' onmouseup='imgCommand();blur()'><input type='button' value='FND' onclick='findIt(document.selection.createRange().text);blur()'></div>"; | |
92 | - if(skinName.match(/30-2/)){nHTML+="<div id='thumbPanel' onmouseout='viewed=false'></div><div id='viewPanel'></div>";} | |
93 | - document.body.insertAdjacentHTML('afterBegin',nHTML); | |
94 | - cp=document.getElementById("controlPanel"); | |
95 | - if(skinName.match(/30-2/)){tp=document.getElementById("thumbPanel");vp=document.getElementById("viewPanel");} | |
93 | + var nHTML ='<div id="controlPanel"><input type="button" value="TOP" onclick="scroll_Top();blur()"><input type="button" value="END" onclick="scroll_End();blur()"><input type="button" value="IMG" onmouseup="imgCommand();blur()"><input type="button" value="FND" onclick="fndCommand();blur();"></div><div id="foundPanel" onmouseout="searched=false"></div>'; | |
94 | + if(skinName.match(/30-2/)){nHTML+='<div id="thumbPanel" onmouseout="viewed=false"></div><div id="viewPanel"></div>';} | |
95 | + document.body.insertAdjacentHTML("afterBegin",nHTML); | |
96 | + cp=document.getElementById("controlPanel");fp=document.getElementById("foundPanel"); | |
97 | + if(skinName.match(/30-2/)){tp=document.getElementById("thumbPanel");vp=document.getElementById("viewPanel");}else{tp=vp=new Object()} | |
98 | + cp.condition="waited";tp.condition="vp.firstChild || viewed || !lightmode";fp.condition=resultView ? "fp.hasChildNodes()" : "searched"; | |
99 | + cp.territory="<25"; tp.territory=">20"; fp.territory="<(30+fp.clientHeight) && fp.hasChildNodes()"; | |
96 | 100 | } |
97 | - cpOver(); | |
98 | - tpOver(); | |
101 | + if(event){panelOver();} | |
102 | + if(!idHash.length){setHash();searchColoring();} | |
99 | 103 | } |
100 | -// Rg[pl | |
101 | -function cpOver(){ | |
104 | +// epl | |
105 | +function panelOver(){ | |
102 | 106 | var territoryW=document.body.clientWidth-120;var territoryH=25; |
103 | - if(waited){cp.style.visibility="visible";return} | |
104 | - if(event.y<territoryH && event.x>territoryW){cp.style.visibility="visible";}else{cp.style.visibility="hidden";} | |
105 | -} | |
106 | -// TlCpl | |
107 | -function tpOver(){ | |
108 | - if(skinName.match(/30-3/) || !lightmode){return} | |
109 | - var territoryW=document.body.clientWidth-120;var territoryH=20; | |
110 | - if(document.getElementById("viewPanel").firstChild || viewed){tp.style.visibility="visible";return} | |
111 | - if(event.y>territoryH && event.x>territoryW){tp.style.visibility="visible";}else{tp.style.visibility="hidden";} | |
107 | + var panels=new Array("cp","tp","fp"); | |
108 | + for(var i in panels){ | |
109 | + if(skinName.match(/30-3/)&&panels[i]=="tp"){continue} | |
110 | + var panel=eval(panels[i]); var territoryY=eval("event.y"+panel.territory); var territoryX=eval(event.x>document.body.clientWidth-panel.offsetWidth-15); | |
111 | + if(eval(panel.condition)){panel.style.visibility="visible";return} | |
112 | + if(territoryY && territoryX){panel.style.visibility="visible";}else{panel.style.visibility="hidden";} | |
113 | + } | |
112 | 114 | } |
113 | 115 | // TOP,END |
114 | 116 | function scroll_Top(){document.getElementsByTagName("DL")[0].firstChild.scrollIntoView(true);} |
@@ -127,6 +129,14 @@ function imgCommand(mode,s){ | ||
127 | 129 | clearCommand(); |
128 | 130 | } |
129 | 131 | } |
132 | +function fndCommand(mode,s){ | |
133 | + if(!waited){ | |
134 | + findIt(document.selection.createRange().text); | |
135 | + event.cancelBubble=true; | |
136 | + }else{ | |
137 | + clearCommand(); | |
138 | + } | |
139 | +} | |
130 | 140 | function clearCommand(){ |
131 | 141 | waited=false; |
132 | 142 | document.getElementById("command").removeNode(true); |
@@ -174,7 +184,7 @@ function key(){ | ||
174 | 184 | else if(code=="36"){scroll_Top()} |
175 | 185 | else if(code=="35"){scroll_End()} |
176 | 186 | else if(code=="73" && event.shiftKey){changePanel();return false;} // shift+I |
177 | - else if(code=="70" && event.shiftKey){cp.childNodes[3].click();return false;} // shift+F | |
187 | + else if(code=="70" && event.shiftKey){findIt(document.selection.createRange().text);return false;} // shift+F | |
178 | 188 | else if(code=="78" && event.shiftKey && firstNew){firstNew.scrollIntoView(true)} // shift+N |
179 | 189 | else if(code=="82" && event.shiftKey && event.ctrlKey){ // ctrl+shift+R |
180 | 190 | //©¿ã`µáâ³iÂXVÌV[gJbgL[j |
@@ -190,7 +200,7 @@ function key(){ | ||
190 | 200 | //=========©¿ãAABoneA]kQ |
191 | 201 | var newResNum=parseInt(document.getElementsByName("GetRescount")[0].content)+1; |
192 | 202 | var k=0; |
193 | -function loadEvent(num){ //setTimeout("setHash();",100); | |
203 | +function loadEvent(num){ | |
194 | 204 | //====V XWv |
195 | 205 | if(newResJump==0){clearInterval(timerID);return} //uuEUC¹vÈçI¹ |
196 | 206 | //V XÌJnÔðæ¾ |
@@ -209,7 +219,7 @@ function loadEvent(num){ //setTimeout("setHash();",100); | ||
209 | 219 | //=========V Xæ¾ãiWXLÎuEUpj©NewMark©çÄÑoµ |
210 | 220 | //=========OpenJAtwin |
211 | 221 | var scr,viewPos,endPos=0; |
212 | -function reloadEvent(){ //setTimeout("setHash();",100); | |
222 | +function reloadEvent(){ | |
213 | 223 | //====ùÇ» |
214 | 224 | var lastDt=dts[dts.length-2];if(!lastDt){return}// SV ÈçI¹ |
215 | 225 | while(lastDt && lastDt.className=="new"){lastDt.className="";lastDt=lastDt.previousSibling.previousSibling;} |
@@ -242,10 +252,10 @@ function defaultPopup(){ | ||
242 | 252 | obj.innerText=num; |
243 | 253 | obj.href="#"+hnum; |
244 | 254 | makePopContent(obj); |
245 | - }else if(num.match(/\w/) && num.length==8){ //\w{8}Å;ßÛH | |
246 | - var obj=document.createElement("span"); | |
247 | - obj.innerText="date time ID:"+num; | |
248 | - setHash();searchID(obj); | |
255 | + }else if(num.match(/\w{8,9}/)){ //\w{8}Å;ßÛH | |
256 | + var obj=document.createElement("DT"); | |
257 | + obj.innerHTML="<span>date time ID:"+num+"</span>"; | |
258 | + searchPerson(obj.firstChild); | |
249 | 259 | } |
250 | 260 | } |
251 | 261 |
@@ -260,5 +270,14 @@ function copyEvent(){ | ||
260 | 270 | copyText.execCommand("Copy"); |
261 | 271 | return false; |
262 | 272 | } |
263 | -//=========onLoadiDAT2HTMLÌÝj | |
264 | -window.onload=function(){setHash()} | |
273 | +//=========onScroll | |
274 | +//window.onscroll=function(){clearInterval(beforeScrollTimer);onLoadEvent()} | |
275 | +window.onscroll=function(){onLoadEvent()} | |
276 | +if(document.getElementById("dl")){ | |
277 | + document.getElementById("dl").onscroll=function(){onLoadEvent()} | |
278 | +} | |
279 | +//=========onLoad | |
280 | +window.onload=onLoadEvent; | |
281 | +function onLoadEvent(){mouseMoveEvent();setHash();searchColoring();} | |
282 | +setTimeout("onLoadEvent()",1000); // êñ¾¯ F | |
283 | + |
@@ -1,7 +1,8 @@ | ||
1 | 1 | // CxgnhFonMouseover |
2 | 2 | // OÏFanchorHead,dds |
3 | -//======æÇÝÝÌÝè | |
4 | -var onMouseLoad=true; // true:J[\ðí¹½¾¯Afalse:LOAD{^ðNbNµÄ©ç | |
3 | +//======æÇÝÝÌÝè ijWindowsXP SP2ÅͱêçÌÝèÍLøÉ@\µÜ¹ñB | |
4 | +var onOpenLoad =1; // 0:ÇÝÜÈ¢A1:V XÌÝA2:S | |
5 | +var onMouseLoad=true; // true:J[\ðí¹½¾¯Afalse:LOAD{^ðNbNµÄ©ç | |
5 | 6 | //==========O[oÏ |
6 | 7 | var lightmode=true; // Live,twinÌWvp»èÅp¢Ä¢éÌÅK{ |
7 | 8 | //==========æ |
@@ -1,4 +1,6 @@ | ||
1 | +//==========ȺÍXNvg{¶Å·æB | |
1 | 2 | // CxgnhFonMouseover |
3 | +// OÏFidHash,refHash,foudRes,highlight | |
2 | 4 | // OÖFaddAnchor,getDTfromAnc |
3 | 5 | // Á¥FDIV#popupBaseºÉutbgÅjAvÉDL#p\dð쬷éB |
4 | 6 | //==========CSSÌoÍ |
@@ -9,65 +11,65 @@ nCSS+='#popupBase dl{position:absolute; background-color:window; border:outset 1 | ||
9 | 11 | nCSS+='#popupBase dt span{float:none; margin-left:1em;}'; |
10 | 12 | nCSS+='#popupBase dd{margin:auto 1em}'; |
11 | 13 | document.write('<style type="text/css">'+nCSS+'</style>\n'); |
12 | -//=========O[oÏ | |
13 | -var pb; | |
14 | +//=========Ot@C¤pÌO[oÏ | |
14 | 15 | //=========io[ȼOÌ|bvAbv |
15 | 16 | function namePopup(e,before,num,after){ |
16 | 17 | var hnum=tohan(num); |
17 | - //RüNASüNASocket774A774KBA21ÖA[1-30]AÈÇͳ | |
18 | - if(before){if(hnum==5 || hnum==774 || hnum==4 || hnum==21 || hnum==1 || hnum==30){return}} | |
18 | + if(hnum==774 || hnum==21 || hnum==1 || hnum==30){return} // Socket774A774KBA21ÖA[1-30]AÈÇͳ | |
19 | + if(before && before.match(/¼³/)){return} //¼³µÁÛ¢Ìͳ | |
20 | + if(after) {if(after=="üN"){return}} // ftHgÈ"üN"ͳ | |
19 | 21 | var nB = before ? "<b>"+before+"</b><b>":"<b>"; nB+=addAnchor(hnum,num); nB+=after ? "</b><b>"+after+"</b>":"</b>"; |
20 | 22 | e.outerHTML=nB; |
21 | 23 | } |
22 | 24 | //=========ã Ú`ñÌ|bvAbv |
23 | -function abonePopup(e){ | |
24 | - var hnum=e.parentElement.previousSibling.innerText; | |
25 | - e.outerHTML = "<b>"+addAnchor(hnum,' Ú`ñ')+"</b>"; | |
25 | +function abonePopup(e){e.outerHTML = "<b>"+addAnchor(e.parentElement.previousSibling.innerText,' Ú`ñ')+"</b>";} | |
26 | +//=========õµ½XÌ|bvAbv | |
27 | +function searchPopup(obj){ | |
28 | + var reg,cArray;var tag=obj.tagName; | |
29 | + /*ref Popup*/if (tag=="A") {if(refHash[obj.innerText]){cArray=refHash[obj.innerText].split(" ")}else{return}} | |
30 | + /*ID Popup*/ else if(tag=="SPAN"){reg=getID(obj);if(reg&®.length>3){cArray=idHash[reg].split(" ");}else{return} if(cArray.length==1){return}} | |
31 | + /*õPopup*/else if(tag=="TT") {var cHash=(obj.parentElement.rel=="res")?foundRes:highlight;cArray=cHash[obj.parentElement.firstChild.style.backgroundColor];if(!cArray){return}} | |
32 | + var targetString=""; for(var i=0;i<cArray.length;i++){targetString+=returnString(cArray[i]);} //gÌØèoµ | |
33 | + if(targetString){popup(targetString);} //ÎÛª¶Ýµ½ç|bvAbv | |
26 | 34 | } |
27 | 35 | //=========½i|bvAbv |
28 | 36 | //E|bvAbvÌì¬ |
29 | -var startRes; | |
30 | 37 | function makePopContent(obj){ |
31 | 38 | //Oõ |
32 | - var num=obj.innerText.replace(/[>]/g,""); | |
33 | - var number=tohan(num); | |
34 | - if(!obj.rel){obj.rel=obj.href;} | |
35 | - obj.href="decoy:"; | |
36 | - //²¸ | |
37 | - if(document.anchors.length==1){return} //Xª1ÈçI¹ | |
38 | - if(!startRes){startRes=parseInt(document.anchors[1].name.replace(/\D/g,""))} | |
39 | + var num=obj.innerText.replace(/[>]/g,""); var number=tohan(num); | |
40 | + if(!obj.rel){obj.rel=obj.href;} obj.href="decoy:"; // uEU{ÌÌ|bvAbvñð | |
41 | + //Ô²¸ | |
39 | 42 | if(number.match(/(\d*)\D+(\d*)/)){var start=parseInt(RegExp.$1); var end=parseInt(RegExp.$2);} |
40 | 43 | else {var start=end=parseInt(number);} |
41 | -// alert(startRes+">"+end+" && "+end+"!=1") | |
42 | - if(startRes>end && end!=1){obj.href=obj.rel;return}//¶ÝµÄ¢È¯êÎI¹ | |
44 | + if(end-start>100){end=start+100} // 100Èã\¦µÈ¢ | |
43 | 45 | //gÌØèoµ |
44 | - var targetString=""; if(end-start>100){end=start+100} | |
45 | - if(start==end){targetString=returnString(start)} | |
46 | - else {for(var i=0;i<=end-start;i++){targetString+=returnString(start+i)}} | |
46 | + var targetString=""; for(var i=0;i<=end-start;i++){targetString+=returnString(start+i)} | |
47 | 47 | //ÎÛª¶Ýµ½çrelÉÞðµÄ|bvAbv |
48 | 48 | if(targetString){popup(targetString);}else{obj.href=obj.rel;} |
49 | 49 | } |
50 | 50 | //EgÌØèoµ |
51 | 51 | function returnString(num){ |
52 | 52 | var obj=getDTfromAnc(num); |
53 | + setSearchColor(obj);//|bvAbvæÌ F | |
53 | 54 | if(!obj){return("")} //ÎÛª§¾ Ú`ñÈçI¹ |
54 | - var dt,dd,dtOuter,ddOuter; | |
55 | - dt=obj.cloneNode(true); | |
56 | - dtOuter=dt.outerHTML.replace(/name=.*?>/,">"); // LABELNUMBERÎÌàÌÉWéNAJ[Ì | |
57 | - dd=obj.nextSibling.cloneNode(true); | |
55 | + var dt=obj.cloneNode(true); | |
56 | + var dtOuter=dt.outerHTML.replace(/name=.*?>/,">"); // LABELNUMBERÎÌàÌÉWéNAJ[Ì | |
57 | + var dd=obj.nextSibling.cloneNode(true); | |
58 | 58 | if(dd.hasChildNodes()){ |
59 | 59 | while(dd.lastChild.name){dd.lastChild.removeNode(true)} // LABELNUMBERñÎÌàÌÉWéNAJ[Ì |
60 | 60 | if(dd.lastChild.tagName=="DL"){dd.lastChild.removeNode(true)} // tQÆÌ |
61 | 61 | } |
62 | - ddOuter=dd.outerHTML; | |
62 | + var ddOuter=dd.outerHTML; | |
63 | 63 | return(dtOuter+ddOuter); |
64 | 64 | } |
65 | 65 | //E|bvAbv |
66 | +var pb; | |
66 | 67 | function popup(inner){ |
67 | 68 | if(!pb){document.body.insertAdjacentHTML('afterBegin','<div id="popupBase"></div>');pb=document.getElementById("popupBase")} |
68 | 69 | //vfÌì¬ |
69 | 70 | var parent=event.srcElement.parentElement; |
70 | - var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; // DDÈO¼OAæAIDõ | |
71 | + //var aNum= (parent.tagName!="DD") ? parent.firstChild.sourceIndex : parent.previousSibling.firstChild.innerText; // DDÈO¼OAæAIDõ | |
72 | + var aNum=event.srcElement.sourceIndex;if(!aNum){alert("aNumæ¾G[")} | |
71 | 73 | if(document.getElementById('p'+aNum)){return} // |bvAbvµÄ½çI¹ |
72 | 74 | pb.insertAdjacentHTML("beforeEnd",'<dl id="p'+aNum+'">'+inner+'</dl>'); |
73 | 75 | //vfÌzu |
@@ -75,16 +77,16 @@ function popup(inner){ | ||
75 | 77 | // y²²® |
76 | 78 | var pos=Math.min(event.y,document.body.clientHeight-event.y); |
77 | 79 | var scTop=document.body.scrollTop+event.y; |
78 | - if(pos==event.y){var y=scTop-30;} // º | |
79 | - else {var y=scTop+10-p.clientHeight;} // ã | |
80 | + if(pos==event.y){var y=scTop-30;} // J[\̺Ö\¦ | |
81 | + else {var y=scTop+10-p.clientHeight;} // J[\ÌãÖ\¦ | |
80 | 82 | if(y<0){y=0} |
81 | - if(event.srcElement.parentElement.id=="foundResult"){y+=30} | |
83 | + if(event.srcElement.parentElement.tagName=="TT"){y+=35;} | |
82 | 84 | p.style.pixelTop=y; |
83 | 85 | // x²²® |
84 | 86 | var pos=Math.min(event.x,document.body.clientWidth-event.x); |
85 | 87 | var scLeft=document.body.scrollLeft+event.x; |
86 | - if(pos==event.x){var x=scLeft-2} // E | |
87 | - else {var x=scLeft-4-p.clientWidth;} // ¶ | |
88 | + if(pos==event.x){var x=scLeft-2} // J[\ÌEÖ\¦ | |
89 | + else {var x=scLeft-4-p.clientWidth;} // J[\̶Ö\¦ | |
88 | 90 | if(x<0){x=0} |
89 | 91 | p.style.pixelLeft=x; |
90 | 92 | // ³²®iscrollBarðv·êÆvµÈ¢êª éj¨y²²® |
@@ -1,243 +1,398 @@ | ||
1 | -// út¶ñÌ FÝè@ F·é:1@ FµÈ¢:0 | |
2 | -coloring=1; | |
3 | -threshold1=[2,"#0000FF"]; // «Ýª¡ éID ̵«¢lÆF | |
4 | -threshold2=[5,"#FF0000"]; // «Ýª½ éID ̵«¢lÆF | |
5 | -threshold3=[1,"#0000FF"]; // «Ýª é X ̵«¢lÆXÔÌF | |
6 | -threshold4=[4,"#FF0000"]; // «Ýª½ éX ̵«¢lÆXÔÌF | |
7 | -// CxgnhFonClick | |
8 | -// OÖFaddAnchor,checkAnchor,tohan | |
9 | -// OÏFanchorHead,browser | |
10 | -// Á¥FCxg¶DTÉηéDDºÉADL-DT-DD\¢ð쬷éB | |
1 | +beID=false; // beÉOCoéêÍAtrue | |
2 | +//==========õÝè | |
3 | +var expression="multiAND"; // õû@@@default:WAregExp:³K\»AmultiAnd:ANDõAmultiOR:ORõ | |
4 | +var searchView="resList"; // õÊ\¦@@resList:YXÔ\¦AresPopup:YX|bvAbvA | |
5 | +var resultView=false; // õÊÌí\¦@@true:í\¦Afalse:}EXÅßï½Æ«ÌÝ\¦ | |
6 | +var listLimit =10; // searchViewªresPopupÅÈ¢êÌAXÔÌ\¦§À | |
7 | +//==========XÔAút¶ñÌ FÝè | |
8 | +coloring=1; // F·é:1@ FµÈ¢:0 | |
9 | +threshold1=[2,"#0000ff"]; // «Ýª¡ éID ̵«¢lÆF | |
10 | +threshold2=[5,"#aaaa00"]; // «Ýª½ éID ̵«¢lÆF | |
11 | +threshold3=[8,"#ff0000"]; // «Ýª½ éID ̵«¢lÆF | |
12 | +threshold4=[1,"#0000FF"]; // «Ýª é X ̵«¢lÆXÔÌF | |
13 | +threshold5=[4,"#aaaa00"]; // «Ýª½ éX ̵«¢lÆXÔÌF | |
14 | +threshold6=[7,"#ff0000"]; // «Ýª½ éX ̵«¢lÆXÔÌF | |
15 | +//==========¼OEIDõÉæéXÌÑÌFwèi16iÍWeb`®ÌF¼ÅwèB¢ÂÅàÂBAt@xbgͬ¶Å¨è¢j | |
16 | +var foundResColor =new Array("#ffdfee","#eeffdf","#ffeedf","#dfffee","#eedfff","#ffffe1"); | |
17 | +//==========PêõÉæénCCgFwèi¯ãj | |
18 | +var highlightColor=new Array("#ffff66","#a0ffff","#99ff99","#ff9999","#ff66ff","#880000","#00aa00","#886800","#004699","#990099"); | |
19 | +//==========ȺÍXNvg{¶Å·æB | |
20 | +// CxgnhFonClick,onScroll,onMousemove | |
21 | +// OÖFaddAnchor,checkAnchor,tohan,searchPopup | |
22 | +// OÏFanchorHead,browser,fp | |
23 | +// tQÆÌÁ¥FCxg¶DTÉηéDDºÉADL-DT-DD\¢ð쬷éB | |
11 | 24 | //==========CSSÌoÍ |
12 | 25 | var nCSS=''; |
13 | -nCSS+='#foundResult{position:absolute;top:expression(body.scrollTop+25);right:18px;padding:2px 5px;z-index:6;background-color:white;border:1px solid #999}'; | |
26 | +nCSS+='#foundPanel {position:absolute;top:expression(body.scrollTop+25);right:18px;padding:2px 5px;z-index:6;background-color:white;border:1px solid #999;visibility:hidden}'; | |
27 | +nCSS+='#foundPanel div{padding-left:5px;text-align:right;font-size:100%;}'; | |
14 | 28 | nCSS+='.refResult{margin:0.5em 0.3em; border:1px solid #666;padding-right:0px}'; |
15 | 29 | nCSS+='.refResult{border-top:none}'; |
16 | 30 | nCSS+='.refResult dt{margin-right:0px;}'; |
17 | 31 | nCSS+='.refResult dd{margin-left:0.8em;}'; |
18 | 32 | document.write('<style type="text/css">'+nCSS+'</style>\n'); |
19 | -//==========õÉæéFwèi16iÍWeb`®ÌF¼ÅwèB¢ÂÅàÂj | |
20 | -var foundColor = new Array("#ffdfee","#eeffdf","#ffeedf","#dfffee","#eedfff","#ffffe1"); | |
21 | 33 | var nCSS=''; |
22 | -for(var css=0;css<foundColor.length;css++){ | |
23 | - nCSS+='#COLOR'+css+" a{border-color:"+foundColor[css]+"}"; | |
24 | - nCSS+='#COLOR'+css+" a:hover{border-color:red}"; | |
34 | +for(var css in foundResColor){ | |
35 | + var c=foundResColor[css].replace(/#/,""); | |
36 | + nCSS+='#COLOR'+c+" a{border-color:"+foundResColor[css]+"}\n"; | |
37 | + nCSS+='#COLOR'+c+" a:hover{border-color:red}\n"; | |
25 | 38 | } |
26 | 39 | document.write('<style type="text/css">'+nCSS+'</style>\n'); |
27 | -//==========O[oÏ | |
40 | +//=========Ot@C¤pÌO[oÏ | |
28 | 41 | var dts=document.getElementsByTagName('DT'); |
29 | 42 | var dds=document.getElementsByTagName('DD'); |
30 | -var fR; | |
43 | +var idHash=new Array(); var refHash=new Array(); | |
44 | +var foundRes,highlight; | |
31 | 45 | //==========IDÆQÆðnbV Éi[ |
32 | -var idHash=new Array(); var refHash=new Array(); var searchEnd=0; | |
46 | +// zñÌnbV æèy¢ÁÛ¢ÌÅAóæØèÌlÉæéPÈnbV ɵÄÝéeXgB | |
47 | +// setEndIdx:{¶Ì¯Xðd¡µÈ¢æ¤ÉAHash»ÊuƵÄÌdtsÌÅIindexðL¯ | |
48 | +// setEndNum:{¶ÈOXðd¡µÈ¢æ¤ÉAÅIXÔðL¯ | |
49 | +var setEndIdx=setEndNum=0; | |
33 | 50 | function setHash(){ |
34 | - var l=dts.length; | |
35 | - if(dts[l-1].rel=="setEnd"){return} // ÅãÜŲ¸ÏÝÈçñð | |
36 | - for(var i=searchEnd;i<l;i++){ | |
51 | + //var t0=new Date(); | |
52 | + var l=Math.min(dts.length,dds.length); | |
53 | + var lastNum=l ? parseInt(dts[l-1].firstChild.innerText) : 0; | |
54 | + if(isNaN(lastNum)&&l>1){lastNum=parseInt(dts[l-2].firstChild.innerText)} //Footer èÈçêÂO | |
55 | + if(l==0 || lastNum<=setEndNum){return} // ÅãÜŲ¸ÏÝÈçñð | |
56 | + for(var i=setEndIdx;i<l;i++){ | |
37 | 57 | if(dds[i].parentElement.className=="refResult"){continue} // tQÆàÌDDÈçñð |
38 | 58 | var num=dts[i].firstChild.innerText; var span=dts[i].lastChild; |
39 | 59 | // ID |
40 | - var t=getID(span); idHash[t] = idHash[t] ? idHash[t]+" "+num : num; | |
41 | - // ref | |
60 | + var t=getID(span); if(t&&t.length>3){idHash[t] = idHash[t] ? idHash[t]+" "+num : num;} // ???âID:0,ID:#(@]k)ÍX[B | |
61 | + // æ | |
62 | + var imgURL=getIMG(span); | |
63 | + if(imgURL){ | |
64 | + var dd=dts[i].nextSibling; | |
65 | + if(tp && imgURL && !dd.getElementsByTagName("IMG").length){ | |
66 | + var aObj=(dd.innerText)?'<br><a href="'+imgURL+'">'+imgURL+'</a>':'<a href="'+imgURL+'">'+imgURL+'</a>'; | |
67 | + if(!beID && imgURL.match(/kako/)){/*dd.insertAdjacentHTML("beforeEnd","<br>BeÉOCµÄÈ¢Ææ¾Å«Ü¹ñ");*/}else{dd.insertAdjacentHTML("beforeEnd",aObj)} | |
68 | + } | |
69 | + } | |
70 | + // ref,IMG | |
42 | 71 | var ddAnc=dds[i].getElementsByTagName("A"); |
43 | - for(var j=ddAnc.length;j--;){ | |
44 | - if(checkAnchor(ddAnc[j].href)!=1){continue} | |
45 | - var anc=tohan(ddAnc[j].innerText.replace(/[>]/g,"")); | |
46 | - if(anc.match(/(\d*)\D+(\d*)/)){ | |
47 | - var start=parseInt(RegExp.$1); var end=parseInt(RegExp.$2); | |
48 | - if(end-start>100){continue} // >>1-1000Æ©ÍØíÉX[ | |
49 | - else if(num-end<3 && start==1){continue} // >>1-n(¼OX)ÍË,Æ©àX[ | |
50 | - for(var k=start;k<=end;k++){ | |
51 | - if(refHash[k] && refHash[k].indexOf(num)!=-1){continue} // d¡ÍX[ | |
52 | - if(num>=k){refHash[k]=refHash[k] ? refHash[k]+" "+num : num;} // ¢ÖÌAJ[ÍX[ | |
72 | + for(var j=0;j<ddAnc.length;j++){ | |
73 | + if (checkAnchor(ddAnc[j].href)==0){ | |
74 | + continue; | |
75 | + }else if(checkAnchor(ddAnc[j].href)==1){ | |
76 | + var anc=tohan(ddAnc[j].innerText.replace(/[>]/g,""));var start,end; | |
77 | + if(anc.match(/(\d*)\D+(\d*)/)){ | |
78 | + start=parseInt(RegExp.$1); end=parseInt(RegExp.$2); | |
79 | + if( (end-start>100) || (num-end<4 && start==1) ){continue} // >>1-1000Æ©>>1-n(¼OX)Æ©ÍØíÉX[ | |
80 | + }else{ | |
81 | + start=end=parseInt(anc); | |
53 | 82 | } |
54 | - }else{anc=parseInt(anc); | |
55 | - if(refHash[anc] && refHash[anc].indexOf(num)!=-1){continue} // d¡ÍX[ | |
56 | - if(num>=anc){refHash[anc]=refHash[anc] ? refHash[anc]+" "+num : num;} // ¢ÖÌAJ[ÍX[ | |
83 | + var k=start-1;do{k++; | |
84 | + if((!refHash[k] || refHash[k].indexOf(num)==-1) && num>k){refHash[k]=refHash[k] ? refHash[k]+" "+num : num;} // d¡â¢ÖÌAJ[ÍX[ | |
85 | + }while(k<end); | |
86 | + }else if(imageExt2(ddAnc[j].href) && onOpenLoad!=0){ | |
87 | + if(onOpenLoad==1){if(dds[i].previousSibling.className!="new"){continue}} | |
88 | + insButton(ddAnc[j],ddAnc[j].href); | |
57 | 89 | } |
58 | 90 | } |
59 | 91 | } |
60 | - dts[l-1].rel="setEnd"; searchEnd=l; | |
92 | + setEndIdx=l;setEndNum=lastNum; | |
93 | + //var t1=new Date(); var t=(t1-t0)/1000; if(t){alert(t+"b");} | |
94 | +} | |
95 | +// XbhEBhESÉOã5Xð F | |
96 | +var resUnit=new Array(); | |
97 | +function searchColoring(){ | |
61 | 98 | if(!coloring){return;} // FsvÈçI¹ |
62 | - for(var i=l;i--;){ | |
63 | - if(!dts[i].innerText){continue} | |
64 | - //if(dts[i].innerText.match(/id:/i)){ // IDªÈ¢ÂÅA¬»·é©àH | |
65 | - var span=dts[i].lastChild; var t=getID(span); if(browser=="zbg]kQ"){span=span.lastChild} | |
66 | - if(t && idHash[t] && span){ | |
67 | - var idResult=idHash[t].split(/\s/); if(t.match(/\?\?\?/)){idResult="";idHash[t]="";} | |
68 | - if (idResult.length>=threshold2[0]){span.style.color=threshold2[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
69 | - else if(idResult.length>=threshold1[0]){span.style.color=threshold1[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
70 | - else if(idResult.length==1){span.title="¯êIDÍ\n èܹñ"} | |
71 | - } | |
72 | - //} | |
73 | - var imgURL=getIMG(span); | |
74 | - if(imgURL){dds[i].insertAdjacentHTML("afterBegin",'<img src="'+imgURL+'"><br>')} | |
75 | - // | |
76 | - var numA=dts[i].firstChild; var num=numA.innerText; | |
77 | - if(refHash[num]){ | |
78 | - var refResult=refHash[num].split(/\s/); | |
79 | - if (refResult.length>=threshold4[0]){numA.style.color=threshold4[1];dts[i].title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
80 | - else if(refResult.length>=threshold3[0]){numA.style.color=threshold3[1];dts[i].title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
81 | - else{numA.title="±êÖÌXÍÈ¢Íl"} | |
99 | + if(!scr){scr=lightmode ? document.body : document.getElementById("dl");} | |
100 | + var nowScrollPos=scr.scrollTop+document.body.clientHeight/2; | |
101 | + var l=Math.min(dts.length,dds.length);var st,ed; | |
102 | + // dtÌoffsetTopði[i25XPÊj | |
103 | + if(resUnit.length<=Math.floor(dts.length/25)){resUnit[0]=0; | |
104 | + for(var i=25;i<l;i+=25){resUnit[i/25]=dts[i].offsetTop;} | |
105 | + } | |
106 | + // »ÝÇÌ ½èÜÅXN[µÄ驲¸ | |
107 | + var rul=resUnit.length-1; | |
108 | + if (rul==0) {st=0;ed=l-1;} //25¢ | |
109 | + else if(resUnit[0]>nowScrollPos) {st=0;ed=24;} //0-24 | |
110 | + else if(resUnit[rul]<nowScrollPos){st=l-26;ed=l-1;} // ÅI25X | |
111 | + else{ | |
112 | + for(var i=rul;i--;){ | |
113 | + if(resUnit[i+1]>nowScrollPos&&resUnit[i]<=nowScrollPos){st=i*25;ed=st+25;break} | |
82 | 114 | } |
83 | 115 | } |
84 | -} | |
85 | -var regIMG=new RegExp(".*?\\s.*?\\s.*:.*?\\sIMG:(.*?)(\\s|$)"); // æàÂ\ɵÄÝé | |
86 | -function getIMG(obj){ | |
87 | - if(regIMG.test(obj.innerText)){ | |
88 | - var filename=RegExp.$1; | |
89 | - var tmp=filename.match(/(\d\d\d\d)(\d\d\d\d)(\d\d)/); | |
90 | - var fileurl="http://up01.2ch.io/_img/"+RegExp.$1+"/"+RegExp.$1+RegExp.$2+"/"+RegExp.$3+"/"+filename; | |
91 | - return(fileurl) | |
92 | - }else{return(false)} | |
93 | -} | |
94 | -//==========¼OEIDõ | |
95 | -// IDÌõEí | |
96 | -function searchID(obj){ | |
97 | - var singleColor=event.altKey; | |
98 | - var decoy=obj.parentElement ? obj.parentElement : obj; | |
99 | - var reg=getID(obj); | |
100 | - if(!decoy.id.match(/^COLOR/)){ | |
101 | - if(!idHash[reg]){return} | |
102 | - var target=new Array();target=idHash[reg].split(" "); | |
103 | - // J[Ið | |
104 | - var c = singleColor ? 0 : selectColor(); | |
105 | - if (c=="restart"){c=0;singleColor=true} | |
106 | - else if(c=="exit"){return;} | |
107 | - // õ | |
108 | - for(i in target){var dt=getDTfromAnc(target[i]);activate(dt,c);} | |
109 | - foundReturn(target); | |
110 | - }else{ | |
111 | - clearResult(obj);return; | |
116 | + // »ÝÌÍÍà©çEBhEÌ^ñ ½èÉ\¦µÄéXðæ¾i±±Å F·éÆA25XPÊÌØÖÉXª F³êÈ¢j | |
117 | + var dtIdx=0; //if(cp){cp.childNodes[1].value=(st+1)+"-"+(ed+1);cp.style.visibility="visible";} | |
118 | + for(var i=st;i<=ed;i++){if(!dts[i+1]){dtIdx=ed;break;} | |
119 | + if(dts[i+1].offsetTop>nowScrollPos && dts[i].offsetTop<=nowScrollPos){dtIdx=i;break;} | |
120 | + } | |
121 | + // dtIdx©ç»ÌüÓðÁè | |
122 | + var start=dtIdx-5;var end=dtIdx+5;// | |
123 | + for(var i=start;i<=end;i++){ | |
124 | + if(dts[i]){setSearchColor(dts[i])} | |
112 | 125 | } |
113 | 126 | } |
114 | -// ID|bvAbv | |
115 | -function searchPopup(obj){ | |
116 | - var objs=document.getElementsByTagName(obj.tagName); | |
117 | - var reg=getID(obj);if(!reg){return} | |
118 | - var target=idHash[reg].split(" "); | |
119 | - if(target.length==1){return} | |
120 | - if(!obj.rel){obj.rel=obj.href;} obj.href="decoy:"; | |
121 | - var targetString=""; for(i in target){targetString+=returnString(target[i])} //gÌØèoµ | |
122 | - if(targetString){popup(targetString);}else{obj.href=obj.rel;} //ÎÛª¶Ýµ½çrelÉÞðµÄ|bvAbv | |
127 | +// IDHashArefHashð³É F | |
128 | +function setSearchColor(dt){ | |
129 | + if(!dt.innerText){return} | |
130 | + // ID | |
131 | + var span=dt.lastChild; var t=getID(span);//alert(t +"&&"+ idHash[t] +"&&"+ span); | |
132 | + if (browser=="zbg]kQ"){span=span.lastChild} | |
133 | + else if(browser=="A Bone") {span=span.childNodes[1]} | |
134 | + if(t && idHash[t] && span){ | |
135 | + var idResult=idHash[t].split(" "); if(t.match(/\?\?\?/)){idResult="";idHash[t]="";} | |
136 | + if (idResult.length>=threshold3[0]){span.style.color=threshold3[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
137 | + else if(idResult.length>=threshold2[0]){span.style.color=threshold2[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
138 | + else if(idResult.length>=threshold1[0]){span.style.color=threshold1[1];span.title="¯êID ("+idResult.length+"ñ)\n"+idHash[t]} | |
139 | + else if(idResult.length==1){span.title="¯êIDÍ\n èܹñ"} | |
140 | + } | |
141 | + // ref | |
142 | + var numA=dt.firstChild; var num=numA.innerText; | |
143 | + if(refHash[num]){ | |
144 | + var refResult=refHash[num].split(" "); | |
145 | + if (refResult.length>=threshold6[0]){numA.style.color=threshold6[1];dt.title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
146 | + else if(refResult.length>=threshold5[0]){numA.style.color=threshold5[1];dt.title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
147 | + else if(refResult.length>=threshold4[0]){numA.style.color=threshold4[1];dt.title="±êÖÌX ("+refResult.length+"Â)\n"+refHash[num];} | |
148 | + else{numA.title="±êÖÌXÍÈ¢Íl"} | |
149 | + } | |
123 | 150 | } |
124 | -// ¼OÌõEí | |
125 | -function search(obj){ | |
126 | - var singleColor=event.altKey; | |
127 | - var objs=document.getElementsByTagName(obj.tagName); | |
128 | - var reg=obj.innerText; var target="objs[i].innerText"; //¼OEgbv | |
129 | - var decoy=obj.parentElement ? obj.parentElement : obj; | |
130 | - if(!decoy.id.match(/^COLOR/)){ | |
131 | - // J[Ið | |
132 | - var c = singleColor ? 0 : selectColor(); | |
133 | - if (c=="restart"){c=0;singleColor=true} | |
134 | - else if(c=="exit"){return;} | |
135 | - // õ | |
136 | - var found=new Array; var l=objs.length; | |
137 | - for(var i=l;i--;){ | |
138 | - var dt=objs[i].parentElement; if(dt.parentElement.className=="refResult"){continue} // tQÆàÌDTÈçñð | |
139 | - if(eval(target)==reg){activate(dt,c);found.unshift(dt.firstChild.innerText);} | |
140 | - else if(singleColor) {deactivate(dt)} | |
151 | +//==========¼OEIDõ | |
152 | +function searchPerson(obj){ | |
153 | + var by,thisDT,reg; | |
154 | + if (obj.tagName=="DT") {by="ID"; thisDT=obj; reg=getID(obj)} | |
155 | + else if(obj.tagName=="SPAN"){by="ID"; thisDT=obj.parentElement;reg=getID(obj)} | |
156 | + else if(obj.tagName=="U") {by="NAME";thisDT=obj.parentElement; reg=obj.innerHTML.replace(/<B>(.*?)<\/B>/ig,"");if(!reg){reg=RegExp.$1.replace(/<.*?A.*?>/ig,"")}/*¼Oª*/} | |
157 | + else if(obj.tagName=="B") {by="NAME";thisDT=obj.parentElement.parentElement;reg=obj.innerText} | |
158 | + else{return} | |
159 | + if(!thisDT.rel){ | |
160 | + var c=selectColor("res"); if(!c){return} var color=new Array(c); // J[Ið | |
161 | + if(by=="ID"){ | |
162 | + if(!reg || !idHash[reg]){return} // IDȵAID:???A{¶Ì¼XÌRsyID | |
163 | + // õnbV ÉlðÝèµÄA»êÉîëX F | |
164 | + foundRes[c]=idHash[reg].split(" "); foundRes[c].word="ID:"+reg; | |
165 | + for(i in foundRes[c]){var dt=getDTfromAnc(foundRes[c][i]);toggleResColor(dt,c);} | |
166 | + }else{ | |
167 | + var us=document.getElementsByTagName("U"); var l=us.length; | |
168 | + var regName=new RegExp();regName.compile(reg); | |
169 | + // [vÉX FElÌÝèð¯Às | |
170 | + for(var i=l;i--;){var dt=us[i].parentElement; | |
171 | + if(dt.parentElement.className=="refResult"){continue} // tQÆàÌDTÈçñð | |
172 | + if(regName.test(us[i].innerText)){toggleResColor(dt,c);foundRes[c].unshift(dt.firstChild.innerText);} | |
173 | + } | |
174 | + foundRes[c].word=reg; | |
141 | 175 | } |
142 | - foundReturn(found); | |
176 | + returnFound("res",color); | |
143 | 177 | }else{ |
144 | - clearResult(obj);return; | |
178 | + clearColor("res",thisDT.style.backgroundColor); | |
145 | 179 | } |
146 | 180 | } |
147 | - | |
148 | 181 | // ID¶ñÌo |
149 | -//var regID=new RegExp("ID:(.*)$"); | |
150 | -var regID=new RegExp(".*?\\s.*?\\s.*:(.*?)(\\s|$)"); // HOSTâçµ½çÎàÂ\ɵÄÝé | |
151 | -function getID(obj){ | |
152 | - if(regID.test(obj.innerText)){return(RegExp.$1)}else{return(false)} | |
182 | +var regID=new RegExp(); // HOSTàÂ\ɵÄÝé | |
183 | +regID.compile(".*?\\s.*?\\s.*:(.*?)(\\s|$)"); // 1000resÅ0.02bÙǬ | |
184 | +function getID(span){ | |
185 | + if(regID.test(span.innerText)){return(RegExp.$1)}else{return(false)} | |
153 | 186 | } |
154 | -// FÝè | |
155 | -function activate(obj,c){ | |
156 | - var color=foundColor[c]; | |
157 | - obj.rev=obj.style.backgroundColor; | |
158 | - obj.style.backgroundColor=color; | |
159 | - obj.id="COLOR"+c; // ¯êidª¡¶¶éªByNameÅÍdtÌname©çæ¾Å«È¢½ßâÞȵ | |
187 | +//==========FÝèð | |
188 | +// IuWFNgÌú» | |
189 | +function createHash(name,key,arr,word){ | |
190 | + name[key]=arr?arr:new Array(); | |
191 | + name[key].word=word?word:""; | |
192 | + name[key].justMovedRes=undefined; | |
160 | 193 | } |
161 | -// FA | |
162 | -function deactivate(obj){if(!obj){return} | |
163 | - obj.style.backgroundColor=obj.rev; | |
164 | - if(obj.id!="sizeinfo"){obj.removeAttribute("id");} | |
165 | - obj.removeAttribute("rev"); | |
166 | - obj.removeAttribute("title"); | |
194 | +// FIð(YXÔzñð½È¢L[ðÔ·) | |
195 | +function selectColor(type){ | |
196 | + if(!foundRes) {foundRes =new Array();for(var i in foundResColor) {createHash(foundRes,foundResColor[i]);}} // Hash foundRes ={F:YXÔzñ} | |
197 | + if(!highlight){highlight=new Array();for(var i in highlightColor){createHash(highlight,highlightColor[i]);}} // Hash hightLight={F:YXÔzñ} | |
198 | + var cHash,cArray,cMess; | |
199 | + if(type=="res"){cHash=foundRes; cArray=foundResColor; cMess="¡ÜÅÌX FððµÜ·©H";} | |
200 | + else {cHash=highlight;cArray=highlightColor;cMess="¡ÜÅÌnCCgððµÜ·©H";} | |
201 | + var i=0; while(cHash[cArray[i]].word){ | |
202 | + i++; if(i==cArray.length){if(confirm(cMess)){clearColor(type);i=0;break}else{i=null;break}} | |
203 | + } | |
204 | + return(cArray[i]); | |
167 | 205 | } |
168 | -// J[Ið | |
169 | -function selectColor(){ | |
170 | - var c=0; | |
171 | - while(document.getElementById("COLOR"+c)){ | |
172 | - c++; | |
173 | - if(!foundColor[c]){if(confirm("Fðú»µÜ·©H")){return("restart")}else{return("exit")}} | |
206 | +// FðinbV AÎÛAfoundPanelj | |
207 | +function clearColor(type,color){ | |
208 | + var cHash=(type=="res")?foundRes:highlight; | |
209 | + if(event && event.altKey){color=""} | |
210 | + for(var i in cHash){ | |
211 | + if(type=="res"){ | |
212 | + if(color && i!=color){continue} // wèFÅȯêÎX[ | |
213 | + for(var j in cHash[i]){ | |
214 | + if(event.srcElement.value=="DEL"){removeRes(getDTfromAnc(cHash[i][j]))}else{toggleResColor(getDTfromAnc(cHash[i][j]))} | |
215 | + } | |
216 | + cHash[i]=new Array(); | |
217 | + document.getElementById("c"+i).removeNode(true); | |
218 | + }else{ | |
219 | + var strongs=document.getElementsByTagName("STRONG"); | |
220 | + var reg=new RegExp(i); | |
221 | + if(!color.match(i)){continue} // wèFÅȯêÎX[ | |
222 | + for(var j=0;j<strongs.length;j++){ | |
223 | + if(strongs[j].style.backgroundColor==i){ | |
224 | + if(event.srcElement.value=="DEL"){removeRes(strongs[j].parentElement.previousSibling);j--}else{strongs[j].removeNode(false);j--} | |
225 | + } | |
226 | + } | |
227 | + cHash[i]=new Array(); | |
228 | + if(document.getElementById("c"+i)){document.getElementById("c"+i).removeNode(true);} // and,orõÅPFÚÌÝ | |
229 | + } | |
174 | 230 | } |
175 | - return(c); | |
231 | + if(!fp.hasChildNodes()){fp.style.visibility="hidden";searched=false;} | |
176 | 232 | } |
177 | -// Ê\¦ | |
178 | -function foundReturn(found){ | |
179 | - if(!fR){document.body.insertAdjacentHTML('afterBegin','<div id="foundResult"></div>');fR=document.getElementById("foundResult");} | |
180 | - //dtÌtitleÉ | |
181 | - for(var i=found.length;i--;){dt=getDTfromAnc(found[i]);dt.title=found.join(" ");} | |
182 | - //foundResultÉ | |
183 | - var buttons='<input type="button" value="CLR" onclick="clearResult(this)" title="Altº\n FXSÄ"><input type="button" value="DEL" onclick="clearResult(this)" title="Altº\n FXSÄ">'; | |
184 | - if(found.length>=20 && confirm("20Èã é¯Ç\¦·éH")==false){ | |
185 | - fR.innerHTML=buttons; fR.title=found.join(" "); | |
233 | +// XFgO | |
234 | +function toggleResColor(dt,c){ | |
235 | + if(!dt){return} // for-inÅçêéÔÈOÌobjÈçI¹ | |
236 | + if(c){ | |
237 | + dt.rev=dt.style.backgroundColor; | |
238 | + dt.rel="colored"; | |
239 | + dt.id ="COLOR"+c.replace(/#/,""); | |
240 | + dt.style.backgroundColor=c; | |
186 | 241 | }else{ |
187 | - for(var i=0;i<found.length;i++){found[i] = addAnchor(found[i],found[i])} | |
188 | - fR.innerHTML=found.join(" ")+buttons; | |
242 | + dt.style.backgroundColor=dt.rev; | |
243 | + if(dt.id.match(/COLOR/)){dt.removeAttribute("id")}//else{alert("dtÉCOLOR***ÈOÌidi"+dt.id+"jªÝè³êĢܷ")} | |
244 | + dt.removeAttribute("rev"); | |
245 | + dt.removeAttribute("rel"); | |
189 | 246 | } |
190 | - fR.style.visibility="visible"; | |
191 | 247 | } |
192 | -// ÊÁAÊí | |
193 | -function clearResult(obj){ | |
194 | - var fromObj=obj.parentElement; | |
195 | - var singleColor=event.altKey; | |
196 | - var result=new Array();var arrayElement; var numbers=fromObj.title ? fromObj.title : fromObj.innerText; | |
197 | - if(singleColor){result=dts; arrayElement="result[i]";} | |
198 | - else {result=numbers.split(" ");arrayElement="getDTfromAnc(result[i])";} | |
199 | - var l=result.length; | |
200 | - if(!result[0]){ | |
201 | - /* õÊ[ÅàresultªnullÉÈçÈ¢Îô */ | |
202 | - }else if(event.srcElement.value!="DEL"){ | |
203 | - for(var i=l;i--;){ | |
204 | - var dt=eval(arrayElement); | |
205 | - deactivate(dt); | |
206 | - } | |
248 | +// õÊÉîëÁ | |
249 | +function removeRes(dt){if(!dt){return} // cHash[i][j]=ID:xxxxxxxxÌÆ« | |
250 | + if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} // LiveÌÝ-§¾ Ú`ñ | |
251 | + dt.nextSibling.removeNode(true);dt.removeNode(true); | |
252 | +} | |
253 | +//==========Ê\¦ | |
254 | +// XÔXgi|bvAbvAJ[ðÜÞj | |
255 | +function returnFound(type,color){ | |
256 | + var cHash=(type=="res")?foundRes:highlight; | |
257 | + var nDIV="";var numArray=cHash[color[0]]; var display=new Array(["none","POP"],["inline","LST"]); | |
258 | + if(searchView=="resPopup" || numArray.length>=listLimit){display=display.reverse();} | |
259 | + // |bvAbv | |
260 | + var nTT="";for(var i=0;i<color.length;i++){nTT+='<tt style="background-color:'+color[i]+'"> '+cHash[color[i]].word+'</tt>';} | |
261 | + nDIV+='<span rel="'+type+'" style="display:'+display[0][0]+'">'+nTT+'</span>'; | |
262 | + // Xg | |
263 | + var nA="";for(var i=0;i<numArray.length;i++){nA+=addAnchor(numArray[i],numArray[i])+" "} | |
264 | + nDIV+='<tt style="background-color:'+color[0]+'" style="display:'+display[1][0]+'"> '+nA+'</tt>'; | |
265 | + // Â | |
266 | + nDIV+=' '+numArray.length+' '; | |
267 | + var buttons='<input type="button" value="'+display[0][1]+'" onclick="changeSearchView();blur()"><input type="button" value="É" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="ºÖõ"><input type="button" value="È" onclick="moveToSearchRes(\''+type+'\',\''+color+'\')" title="ãÖõ"><input type="button" value="CLR" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Altº\n FXSÄ"><input type="button" value="DEL" onclick="clearColor(\''+type+'\',\''+color+'\')" title="Altº\n FXSÄ">'; | |
268 | + fp.innerHTML+='<div id="c'+color[0]+'">'+nDIV+buttons+'</div>'; | |
269 | + fp.style.visibility="visible";searched=true; | |
270 | +} | |
271 | +// ÎÛXÉWv | |
272 | +var markedDT; | |
273 | +function moveToSearchRes(type,color){ | |
274 | + if(color.match(/(.*?),/)){color=RegExp.$1} | |
275 | + var scope = (event && event.srcElement.value=="È") ? false : true ; | |
276 | + var numArray= (type=="res") ? foundRes[color] : highlight[color]; | |
277 | + if(isNaN(numArray.justMovedRes)){numArray.justMovedRes=0} | |
278 | + else{ | |
279 | + markedDT.style.borderColor="#999"; | |
280 | + if(scope){numArray.justMovedRes++;if(numArray.justMovedRes>=numArray.length){numArray.justMovedRes--;alert("±êæèºÉÍ èܹñ")}} | |
281 | + else {numArray.justMovedRes--;if(numArray.justMovedRes<0){numArray.justMovedRes++;alert("±êæèãÉÍ èܹñ")}} | |
282 | + } | |
283 | + markedDT=getDTfromAnc(numArray[numArray.justMovedRes]); markedDT.style.borderColor="red"; | |
284 | + markedDT.scrollIntoView(true); | |
285 | + setTimeout('markedDT.style.borderColor="#999"',5000); | |
286 | +} | |
287 | +// |bvAbvÆXg\¦ØèÖ¦ | |
288 | +function changeSearchView(){ | |
289 | + var e=event.srcElement; | |
290 | + if(e.value=="POP"){ | |
291 | + e.value="LST"; | |
292 | + e.parentElement.childNodes[0].style.display="inline"; | |
293 | + e.parentElement.childNodes[1].style.display="none"; | |
207 | 294 | }else{ |
208 | - for(var i=l;i--;){ | |
209 | - var dt=eval(arrayElement); var dd=dt.nextSibling; | |
210 | - //Live@\ÇÁ - §¾ Ú`ñ | |
211 | - if(browser=="Live2ch"){location.href='func:ABONECLEAR?'+dt.firstChild.innerText;} | |
212 | - dt.removeNode(true); dd.removeNode(true); | |
213 | - } | |
295 | + e.value="POP"; | |
296 | + e.parentElement.childNodes[0].style.display="none"; | |
297 | + e.parentElement.childNodes[1].style.display="inline"; | |
214 | 298 | } |
215 | - if(fR){fR.innerText="";fR.style.visibility="hidden";} | |
216 | 299 | } |
217 | 300 | |
218 | 301 | //==========Pêõ |
219 | -function findIt(word){ | |
220 | - if(!word){ | |
221 | - var word = prompt("õ·é¶ðü͵ľ³¢B",""); | |
222 | - word = unescape(escape(word).split("%00")[0]); //IE5ÌoOÎô | |
302 | +function findIt(arg){createSearchPanel(arg);} | |
303 | +var searchWindow=null; | |
304 | +// õEBhEÌ\¦ | |
305 | +function createSearchPanel(arg){ // êpuEUÅÌmodelessDialogÖÌOÇÝÝÅÍAdialogArgumentsªêÈ¢Ìżګo· | |
306 | + if(arg){word=arg} | |
307 | + if(searchWindow && !searchWindow.closed){return} | |
308 | + var skinPath=document.getElementsByName("SkinPath")[0].content; | |
309 | + searchWindow=showModelessDialog("",window,'dialogWidth:500px;dialogHeight:200px;dialogTop:0px;dialogLeft:0px;help:no;resizable:yes;status:no;unadorned:yes;'); | |
310 | + var nWin='<html><head><title>PêÌõ<\/title>' | |
311 | + +'<script type="text/javascript">function submitEvent(){var fo=document.forms[0]; dialogArguments.word=fo.word.value; var i=-1;do{i++;dialogArguments.expression =fo.expression[i].value;}while(!fo.expression[i].checked); var i=0; while(fo.searchTarget[i]){dialogArguments.searchTarget[fo.searchTarget[i].value]=fo.searchTarget[i].checked;i++;} var i=-1;do{i++;dialogArguments.searchView =fo.searchView[i].value;}while(!fo.searchView[i].checked); dialogArguments.searchWord();}</script>' | |
312 | + +'<style type="text/css">body{background:ThreeDFace;padding:0.5em;overflow:auto} fieldset{padding:0.5em;margin-top:0.5em;} legend,label,input{font:message-box;}</style>' | |
313 | + +'<\/head><body onunload="unloadEvent()"><form onsubmit="submitEvent();return false;"><table width="100%"><tr><td valign="top" colspan="3">' | |
314 | + +'<label for="word">õ¶ñF</label><input type="text" name="word" id="word" size="50" value="'+word+'" tabindex="0"><br>' | |
315 | + +'</td><td align="right" valign="top" rowspan="2">' | |
316 | + +'<input type="submit" name="submit" value="@@õ@" tabindex="7"><br><br><input type="button" name="cancel" value="LZ" onclick="window.close()" tabindex="8">' | |
317 | + +'</td></tr><tr valign="top">' | |
318 | + +'<td><fieldset><legend>õû@</legend><input type="radio" name="expression" value="default" id="tDef" tabindex="1"> <label for="tDef">Êíõ</label><br><input type="radio" name="expression" value="regExp" id="tReg"> <label for="tReg">³K\»</label><br><input type="radio" name="expression" value="multiAND" id="tAND"> <label for="tAND">ANDõ</label><br><input type="radio" name="expression" value="multiOR" id="tOR"> <label for="tOR">ORõ</label></fieldset></td>' | |
319 | + +'<td><fieldset><legend>õÎÛ</legend><input type="checkbox" name="searchTarget" value="name" id="tName" tabindex="2" checked> <label for="tName">¼O</label><br><input type="checkbox" name="searchTarget" value="mail" id="tMail" tabindex="3" checked> <label for="tMail">[</label><br><input type="checkbox" name="searchTarget" value="id" id="tID" tabindex="4" checked> <label for="tID">útÆID</label><br><input type="checkbox" name="searchTarget" value="mess" id="tMess" tabindex="5" checked> <label for="tMess">{¶</label></fieldset></td>' | |
320 | + +'<td><fieldset><legend>Ê\¦</legend><input type="radio" name="searchView" value="resList" id="rList" tabindex="6"> <label for="rList">XÔð\¦</label><br><input type="radio" name="searchView" value="resPopup" id="rPop"> <label for="rPop">Xð|bvAbv</label><br><input type="radio" name="searchView" value="resJump" id="rJump"> <label for="rJump">XÖWv</label></fieldset></td>' | |
321 | + +'</tr></table></form><\/body><\/html>'; | |
322 | + searchWindow.document.write(nWin); | |
323 | + sdf=searchWindow.document.forms[0]; sdf.elements[0].select(); | |
324 | + var ex=sdf.expression;for(var i=0;i<ex.length;i++){if(ex[i].value==expression){ex[i].checked=true}} | |
325 | + var sv=sdf.searchView;for(var i=0;i<sv.length;i++){if(sv[i].value==searchView){sv[i].checked=true}} | |
326 | + range=document.body.createTextRange(); | |
327 | +} | |
328 | +// õC | |
329 | +var word="";var range;var searchTarget={"word":true}; | |
330 | +function searchWord(){ | |
331 | + if(!word){return} | |
332 | + var matchs=new Array(); var color=new Array(); | |
333 | + // õû@ | |
334 | + if(expression=="regExp" || expression=="default" || (expression.match(/multi/) && !word.match(/\s/))){ // AND/ORÅêPêÈçdefaultÅõ | |
335 | + // õêwèid¡rŬ»Hj | |
336 | + if(expression=="regExp"){ | |
337 | + var regWord=word.replace(/[\^\$]/g,""); | |
338 | + var reg=new RegExp(regWord,"g"); var tmpArr=range.text.match(reg); var tmp; | |
339 | + if(!tmpArr || !tmpArr.length){tmpArr=new Array(tmpArr)} // õÊ0or1ÈçAzñì¬ | |
340 | + tmpArr.sort();for(var i=0;i<tmpArr.length;i++){if(tmp!=tmpArr[i]){matchs.push(tmpArr[i])}tmp=tmpArr[i]} | |
341 | + if(!matchs || !matchs.length){matchs[0]=word} // õÊ0or1ÈçAzñì¬ | |
342 | + }else{matchs[0]=word} | |
343 | + // nCCg | |
344 | + for(var i=0;i<matchs.length;i++){color.push(setHighlight(matchs[i]));} | |
345 | + highlight[color[0]].word=word; | |
346 | + }else{ | |
347 | + // õêwè | |
348 | + var matchs=word.split(" "); var tmpArr=new Array(); var tmp; | |
349 | + // nCCg¨d¡ | |
350 | + for(var i=0;i<matchs.length;i++){ | |
351 | + color.unshift(setHighlight(matchs[i])); | |
352 | + highlight[color[0]].word=matchs[i]; | |
353 | + tmpArr=tmpArr.concat(highlight[color[0]]) | |
354 | + } | |
355 | + color.reverse();tmpArr.sort();createHash(highlight,color[0],"",matchs[0]); // êUú» | |
356 | + var judge = (expression=="multiAND") ? "tmp==tmpArr[i]" : "tmp!=tmpArr[i]"; | |
357 | + for(var i=0;i<tmpArr.length;i++){if(eval(judge)){highlight[color[0]].push(tmpArr[i])}tmp=tmpArr[i]} // õÊÍhighlight[color[0]]Éüêé | |
223 | 358 | } |
224 | - if(!word || word=="null"){return} | |
359 | + // Ê\¦ | |
360 | + if (searchView=="resList") {returnFound("search",color);searchWindow.close();} | |
361 | + else if(searchView=="resPopup"){returnFound("search",color);searchWindow.close();} | |
362 | + else if(searchView=="resJump") {returnFound("search",color);searchWindow.close();if(highlight[color[0]].length){moveToSearchRes("search",color.join(","))}} | |
363 | +} | |
364 | +// nCCgõ | |
365 | +function setHighlight(reg){ | |
225 | 366 | // J[Ið |
226 | - var singleColor=event.altKey; | |
227 | - var c = singleColor ? 0 : selectColor(); | |
228 | - if (c=="restart"){c=0;singleColor=true} | |
229 | - else if(c=="exit"){return;} | |
367 | + var c=selectColor("highlight"); if(!c){return} | |
230 | 368 | // õ |
231 | - var found=new Array; var l=dds.length; | |
232 | - var bodyText=document.body.createTextRange(); | |
233 | - for(var i=l;i--;){ | |
234 | - var dt=dts[i]; var dd=dds[i]; if(dt.parentElement.className=="refResult"){continue} // tQÆàÌDTÈçñð | |
235 | - bodyText.moveToElementText(dt); var checkDT=bodyText.findText(word,0); | |
236 | - bodyText.moveToElementText(dd); var checkDD=bodyText.findText(word,0); | |
237 | - if(checkDT || checkDD){activate(dt,c);found.unshift(dt.firstChild.innerText)} | |
238 | - else if(singleColor) {deactivate(dt);} | |
369 | + while(range.findText(reg)){ | |
370 | + var dt=range.parentElement();var tag=dt.tagName; var thisRange; | |
371 | + // õÎÛÅièÝ | |
372 | + if(tag=="B"||tag=="U"){thisRange="name"} | |
373 | + else if(tag=="DT") {thisRange="mail"} | |
374 | + else if(tag=="SPAN") {thisRange="id"} | |
375 | + else if(tag=="DD" || tag=="A" && dt.parentElement.tagName=="DD"){thisRange="mess"} | |
376 | + else if(tag=="STRONG"){thisRange="word"} | |
377 | + else{/*alert("tagF"+tag+"\ndt:"+dt.outerHTML);*/range.collapse(false);continue;} // XÔ(A)âõÊ©Ì(TT) | |
378 | + if(!searchTarget[thisRange]){range.collapse(false);continue;} | |
379 | + // ³K\»ÌÊuwèqª éêAïÜvfàÅÄõ | |
380 | + if(expression=="regExp" && word.match(/[\^|\$]/)){ | |
381 | + var thisReg=new RegExp(word); var targetText=(tag=="STRONG") ? dt.parentElement.innerText : dt.innerText; | |
382 | + if(!targetText.match(thisReg)){range.collapse(false);continue} | |
383 | + } | |
384 | + // dt澨XÔ澨nCCg | |
385 | + if(dt.tagName!="DT"){ | |
386 | + while(dt.tagName!="DT" && dt.tagName!="DD"){dt=dt.parentElement} | |
387 | + if(dt.tagName=="DD"){dt=dt.previousSibling} | |
388 | + } | |
389 | + var num=dt.firstChild.innerText; | |
390 | + if(dt.parentElement.className!="refResult" && num!=highlight[c][highlight[c].length-1]){highlight[c].push(num)} // tQÆàÌDT,¯êÔÈçñð | |
391 | + range.pasteHTML('<strong style="background-color:'+c+'">'+range.text+'</strong>'); | |
392 | + range.collapse(false); | |
239 | 393 | } |
240 | - if(found){foundReturn(found)} | |
394 | + range=document.body.createTextRange(); // Wð³ÉߵĨ | |
395 | + return(c); | |
241 | 396 | } |
242 | 397 | //==========tQÆ |
243 | 398 | function searchRef(obj){ |
@@ -245,16 +400,7 @@ function searchRef(obj){ | ||
245 | 400 | var num=obj.firstChild.innerText; |
246 | 401 | if(refHash[num]){ |
247 | 402 | var refArr=refHash[num].split(/\s/); var refs=""; |
248 | - for(var i=0;i<refArr.length;i++){ | |
249 | - var dtOrg=getDTfromAnc(refArr[i]); var dt=dtOrg.cloneNode(true); var dd=dtOrg.nextSibling.cloneNode(true); | |
250 | - // {¶ÈOðí | |
251 | - if(dd.lastChild){ | |
252 | - if(dd.lastChild.tagName=="DL"){dd.lastChild.removeNode(true);} //tQÆÌ | |
253 | - if(dd.lastChild.name){dd.lastChild.removeNode(true);} // LABELNUMBERªÈ¢àÌÉWésvAJ[Ì | |
254 | - } | |
255 | - // {¶ði[ | |
256 | - refs+=dt.outerHTML.replace(/name=.*?>/,">")+dd.outerHTML.replace(/<a name=.*>/i,""); | |
257 | - } | |
403 | + for(var i=0;i<refArr.length;i++){refs+=returnString(refArr[i]);} | |
258 | 404 | obj.nextSibling.insertAdjacentHTML("beforeEnd",'<dl class="refResult">'+refs+'</dl>') |
259 | 405 | obj.name="referred"; |
260 | 406 | } |
@@ -282,9 +428,26 @@ function getDTfromAnc(num){ | ||
282 | 428 | var anc=ancs(anchorHead+num); |
283 | 429 | if(!anc){return("")} //LABELNUMBERÎÌ Ú`ñáµÍ¢oÔÈçI¹ |
284 | 430 | var obj=anc.parentElement; //LABELNUMBERÎÌàÌ |
431 | + if(!obj || !obj.tagName){return false;} | |
285 | 432 | if(obj.tagName!="DT"){ //LABELNUMBERñÎÌàÌ |
286 | 433 | if(num==1){if(anc){obj=anc.nextSibling} else{return("")}} |
287 | 434 | else {if(!anc.nextSibling){obj=anc.parentElement.nextSibling}else{return("")}} |
288 | 435 | } |
289 | 436 | return(obj); |
290 | -} | |
\ No newline at end of file | ||
437 | +} | |
438 | + | |
439 | +// æÂÖA | |
440 | +var regIMG=new RegExp(".*?\\s.*?\\s.*:.*?\\sIMG:(.*?)(\\s|$)"); // æàÂ\ɵÄÝé | |
441 | +function getIMG(obj){ | |
442 | + if(regIMG.test(obj.innerText)){ | |
443 | + var filename=RegExp.$1; | |
444 | + var tmp=filename.match(/(\d\d\d\d)(\d\d\d\d)(\d\d)/); | |
445 | + var today=new Date();var last=new Date(today-7*24*60*60*1000);var date=""; | |
446 | + date+=last.getMonth()<9 ? "0"+(last.getMonth()+1) : last.getMonth()+1; | |
447 | + date+=last.getDate()<10 ? "0"+last.getDate() : last.getDate(); | |
448 | + var log= (RegExp.$1+""+RegExp.$2 < last.getYear()+""+date) ? "_kako/" : "_img/"; | |
449 | + var fileurl="http://up01.2ch.io/"+log+RegExp.$1+"/"+RegExp.$1+RegExp.$2+"/"+RegExp.$3+"/"+filename; | |
450 | + return(fileurl) | |
451 | + }else{return(false)} | |
452 | +} | |
453 | + |