-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
58 lines (58 loc) · 7.72 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html><head>
<script src="http://<!--#exec cmd="/Library/WebServer/Documents/ip.pl" -->:8080/target/target-script-min.js"></script>
<!--
-->
</head><body style="padding:3em 1em;">
body has flowing text
<madeup>flow words</madeup>
<p>fl<b>o</b><u>wing</u></p>
<textarea> flow </textarea>
<div> <textarea> flow </textarea> </div>
<div> <div> <p> <textarea> flow </textarea> </p></div> </div>
<a href="#top">flow to top</a>
<p>flow this that and the other <input type="text" value="a flow b"/></p>
<p>a Flow this that and the other & stuff</p>
<p style="display:none">do-not-show-me</p>
<p>FLOW this that and the other</p>
<p>then flow this that and the other</p>
<p>pinger flow this that and the other</p>
<p>flow this that and the other</p>
<span>flow</span>
<h1>search and be done with it</h1>
<p>flow this that and the other</p>
<h1>search and be done with it</h1>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<p>flow this that and the other</p>
<script>
(function(){
var item, i=0, list = document.querySelectorAll('p');
while(item = list.item(i++)){
item.insertBefore(document.createTextNode(i),item.firstChild);
}
})();
</script>
<script src="search.js"></script>
<h1><a href="http://www.refresh-sf.com/yui/#output">compress js</a></h1>
<p><a href="http://<!--#exec cmd="/Library/WebServer/Documents/ip.pl" -->:8080/client/#anonymous">weinre</a></p>
<h1><a href='javascript:void((function(){var p=window,k=document,m=k.body,j=k.createElement("form"),g;o={cAse:false,dir:1,index:0},n=(new Date).getTime();function l(b,d,i){b.addEventListener(d,i)}function c(b){j.setAttribute("style","top:"+m.scrollTop+"px;left:"+m.scrollLeft+"px;")}function h(b,d){return b.querySelectorAll(d)}o.l=h(k,"form.findonpage")[0]||false;if(o.l){return o.l.style.display="block"}j.className="findonpage";j.innerHTML="<input type=text><input type=submit class=prev value=<><input type=submit class=next value=\">\"><br><input type=checkbox class=regex id=regex> <label for=regex>regex</label><input type=checkbox class=case id=cAse> <label for=cAse title=Case-Sensitive>Case</label><input type=button value=clear><input type=button value=x><style>.findonpage{background:rgba(255,255,255,0.8);position:absolute;top:0;left:0;}.found_string{border-radius:5px;border:1px dotted #555;color:black !important;background:yellow !important;padding:1px;}.found_highlight{padding:3px;border:1px solid black;box-shadow:0 0 8px #555;}</style>";var a=/\bnext\b/;var e=0,q,r=h(j,"[type=submit]");while(q=r[e++]){l(q,"click",function(b){o.dir=a.test(this.className)?1:0})}m.appendChild(j);l(j,"submit",function(u){u.preventDefault();o.cAse=h(this,".case")[0].checked;function t(F){k.designMode="on";var K=p.getSelection();K.collapse(H,0);var y,x,I,H,D,C,G,E=0,J=/^(?:INPUT|TEXTAREA|text)$/i;while(p.find(F,o.cAse,0,0,0,1,1)){E++;I=K.anchorNode;y=I.parentNode;x=k.activeElement;if(!(J.test(x.nodeName)&&J.test(x.type))){H=K.focusNode;D=I==H?false:H.parentNode;G=k.defaultView.getComputedStyle(y,null).backgroundColor;k.execCommand("HiliteColor",false,"yellow");if(D){C=K.focusNode.parentNode;C.setAttribute("data-search_generated",C!=D?"true":G)}x=K.anchorNode.parentNode;x.setAttribute("data-search_generated",y!=x?"true":G)}x.className+=(" found_string search"+E);if(C){C.className+=(" found_string search"+E)}D=C=0;K.collapseToEnd()}k.designMode="off";o.max=E;o.i=o.dir?0:E-1}var z,w,f,b,s,A,v,d=h(this,"[type=text]")[0].value,B=/\b(?:found_string|search[0-9]+|found_highlight)\b/g;if(o.txt==d){o.i+=o.dir?1:-1}else{o.txt=d;f=h(k,".found_string");s=0;while(A=f[s++]){v=A.getAttribute("data-search_generated");if(v=="true"){v=k.createDocumentFragment();z=0;w=A.childNodes;while(w.length){v.appendChild(w[0])}A.parentNode.replaceChild(v,A)}else{A.style.backgroundColor=v;A.className=A.className.replace(B," ")}}m.removeChild(this);t(d);m.appendChild(this)}if(o.i>=o.max){o.i=0}else{if(o.i<0){o.i=o.max-1}}f=h(k,".search"+(o.i+1));if(f.length){s=0;v=h(k,".found_highlight");while(A=v[s++]){A.className=A.className.replace(/\bfound_highlight\b/g," ")}s=0;while(A=f[s++]){A.className+=" found_highlight"}f=f[0];z=0,w=0;while(f){z+=f.offsetLeft,w+=f.offsetTop;f=f.offsetParent}w-=this.offsetHeight;p.scrollTo(z-10,w-10)}h(j,"[type=submit]")[o.dir].focus()});q=h(j,"[type=text]")[0];q.value="flow";q.focus();l(p,"scroll",c)})());'>bookmarklet</a></h1>
<textarea>javascript:void((function(){var p=window,k=document,m=k.body,j=k.createElement("form"),g;o={cAse:false,dir:1,index:0},n=(new Date).getTime();function l(b,d,i){b.addEventListener(d,i)}function c(b){j.setAttribute("style","top:"+m.scrollTop+"px;left:"+m.scrollLeft+"px;")}function h(b,d){return b.querySelectorAll(d)}o.l=h(k,"form.findonpage")[0]||false;if(o.l){return o.l.style.display="block"}j.className="findonpage";j.innerHTML="<input type=text><input type=submit class=prev value=<><input type=submit class=next value=\">\"><br><input type=checkbox class=regex id=regex> <label for=regex>regex</label><input type=checkbox class=case id=cAse> <label for=cAse title=Case-Sensitive>Case</label><input type=button value=clear><input type=button value=x><style>.findonpage{background:rgba(255,255,255,0.8);position:absolute;top:0;left:0;}.found_string{border-radius:5px;border:1px dotted #555;color:black !important;background:yellow !important;padding:1px;}.found_highlight{padding:3px;border:1px solid black;box-shadow:0 0 8px #555;}</style>";var a=/\bnext\b/;var e=0,q,r=h(j,"[type=submit]");while(q=r[e++]){l(q,"click",function(b){o.dir=a.test(this.className)?1:0})}m.appendChild(j);l(j,"submit",function(u){u.preventDefault();o.cAse=h(this,".case")[0].checked;function t(F){k.designMode="on";var K=p.getSelection();K.collapse(H,0);var y,x,I,H,D,C,G,E=0,J=/^(?:INPUT|TEXTAREA|text)$/i;while(p.find(F,o.cAse,0,0,0,1,1)){E++;I=K.anchorNode;y=I.parentNode;x=k.activeElement;if(!(J.test(x.nodeName)&&J.test(x.type))){H=K.focusNode;D=I==H?false:H.parentNode;G=k.defaultView.getComputedStyle(y,null).backgroundColor;k.execCommand("HiliteColor",false,"yellow");if(D){C=K.focusNode.parentNode;C.setAttribute("data-search_generated",C!=D?"true":G)}x=K.anchorNode.parentNode;x.setAttribute("data-search_generated",y!=x?"true":G)}x.className+=(" found_string search"+E);if(C){C.className+=(" found_string search"+E)}D=C=0;K.collapseToEnd()}k.designMode="off";o.max=E;o.i=o.dir?0:E-1}var z,w,f,b,s,A,v,d=h(this,"[type=text]")[0].value,B=/\b(?:found_string|search[0-9]+|found_highlight)\b/g;if(o.txt==d){o.i+=o.dir?1:-1}else{o.txt=d;f=h(k,".found_string");s=0;while(A=f[s++]){v=A.getAttribute("data-search_generated");if(v=="true"){v=k.createDocumentFragment();z=0;w=A.childNodes;while(w.length){v.appendChild(w[0])}A.parentNode.replaceChild(v,A)}else{A.style.backgroundColor=v;A.className=A.className.replace(B," ")}}m.removeChild(this);t(d);m.appendChild(this)}if(o.i>=o.max){o.i=0}else{if(o.i<0){o.i=o.max-1}}f=h(k,".search"+(o.i+1));if(f.length){s=0;v=h(k,".found_highlight");while(A=v[s++]){A.className=A.className.replace(/\bfound_highlight\b/g," ")}s=0;while(A=f[s++]){A.className+=" found_highlight"}f=f[0];z=0,w=0;while(f){z+=f.offsetLeft,w+=f.offsetTop;f=f.offsetParent}w-=this.offsetHeight;p.scrollTo(z-10,w-10)}h(j,"[type=submit]")[o.dir].focus()});q=h(j,"[type=text]")[0];q.value="flow";q.focus();l(p,"scroll",c)})());
</textarea>
</body></html>