Apache2-Autocomplete
view release on metacpan or search on metacpan
var x="",$a=false,qa="",da=false,k="",M="",j="",r=-1,n=null,A=-1,U=null,pa=5,w="",mb="div",Ya="span",H=null,d=null,i=null,m=null,Ta=null,Va=null,J=null,u=null,ua=false,Ca={},T=1,ia=1,ha=false,aa=false,va=-1,Qa=(new Date).getTime(),F=false,q=null,ra=n...
"search";Pa=e;var o="zh|zh-CN|zh-TW|ja|ko|",y="iw|ar|fa|ur|";if(!f||f.length<1)f="en";u=Ea(f);if(y.indexOf(u+"|")!=-1){G="right";V="left"}if(u=="zh-TW"||u=="zh-CN"||u=="ja"){ya=true}if(o.indexOf(u+"|")==-1){J=false;aa=true;ha=false;$=false}else{J=fal...
70;document.fireEvent("onkeydown",a)}}function jb(a){if(!a&&window.event)a=window.event;if(a)va=a.keyCode;if(a&&a.keyCode==8){if(J&&d.createTextRange&&a.srcElement==d&&O(d)==0&&P(d)==0){Wa(d);a.cancelBubble=true;a.returnValue=false;return false}}}fun...
m.style.height=i.style.height}}}function Ha(){if(navigator&&navigator.userAgent.toLowerCase().indexOf("msie")==-1){return d.offsetWidth-T*2}else{return d.offsetWidth}}function db(){if(Ja()){F=true}else{F=false}if($a)E="complete";else E="/complete/"+P...
okdh;d.onkeyup=okuh}d.onsubmit=la;k=d.value;qa=k;i=document.createElement("DIV");i.id="completeDiv";T=1;ia=1;i.style.borderRight="black "+T+"px solid";i.style.borderLeft="black "+T+"px solid";i.style.borderTop="black "+ia+"px solid";i.style.borderBot...
m.id="completeIFrame";m.style.zIndex="1";m.style.position="absolute";if(window.opera&&(!window.opera.version||window.opera.version()<="8.54"))m.style.display="none";else m.style.display="block";m.style.visibility="hidden";m.style.borderRightWidth="0"...
a.style.left="0";a.style.top="-10000";a.style.width="0";a.style.height="0";var b=document.createElement("IFRAME");b.completeDiv=i;b.name="completionFrame";b.id="completionFrame";if(!F){b.src=ra}a.appendChild(b);document.body.appendChild(a);if(frames&...
10);if(d.attachEvent){d.attachEvent("onpropertychange",ab)}}p=document.createElement("INPUT");p.type="hidden";p.name="aq";p.value=null;p.disabled=true;H.appendChild(p);t=document.createElement("INPUT");t.type="hidden";t.name="oq";t.value=null;t.disab...
okdh=function(a){if(!(ga(a.keyCode)||fa(a.keyCode))){return true}R++;if(R%3==1)za(a);return false};okuh=function(a){if(!(ya&&(ga(a.keyCode)||fa(a.keyCode)))&&R==0){za(a)}R=0;return false};function za(a){if(!ka){ka=true}j=a.keyCode;Z=d.value;Oa()}func...
b){var f=c[e].innerHTML;if(f==" ")return"";else{var h=rb(f);return h}}}}else{return""}}function L(a){if(!a)return null;return Ga(a,"cAutoComplete")}function ma(a){if(!a)return null;return Ga(a,"dAutoComplete")}function B(){document.getElementByI...
ca()}function Aa(a,b,c){Ca[a]=new Array(b,c)}Suggest_apply=function(a,b,c,e){if(c.length==0||c[0]<2)return;var f=[],h=[],g=c[0],l=Math.floor((c.length-1)/g);for(var o=0;o<l;o++){f.push(c[o*g+1]);h.push(c[o*g+2])}var y=e?e:[];sendRPCDone(a,b,f,h,y)};s...
L);if(pa>0){g.height=16*pa+4;m.height=g.height-4}else{B()}};hcd=function(){B();C=null};function Oa(){if(j==40||j==38)Fa();var a=P(d),b=O(d),c=d.value;if(J&&j!=0){if(a>0&&b!=-1)c=c.substring(0,b);if(j==13||j==3){var e=d;if(e.createTextRange){var f=e.c...
j<=123)){k=c;if(j!=39)oa=c}if(Xa(j)&&j!=0&&ja==k)Ka(i,L);if(ja!=k&&!C)C=setTimeout("hcd()",500)}function la(){return eb(x)}function eb(a){da=true;if(!F){ta("qu","",0,E,null,null)}B();if(a=="url"){var b="";if(r!=-1&&n)b=L(n);if(b=="")b=d.value;if(w=="...
S;p.disabled=false}else if(I>=3||D>=10){p.value="o";p.disabled=false}S=null;return true}}newwin=function(){window.open(d.value);B();return false};idkc=function(a){if($){if(W){Ua()}var b=d.value;if(b!=Z){j=0;Oa()}Z=b;setTimeout("idkc()",10)}};function...
k,b[0],b[1],K.completeDiv.prefixStrings)}else{D++;Qa=(new Date).getTime();if(F){ob(a)}else{ta("qu",a,null,E,null,null);frames["completionFrame"].document.location.reload(true)}}d.focus()}da=false}qa=k;setTimeout("idfn()",bb(D));return true};setTimeou...
for(var c=0;c<A;c++){if(U[c]==n){r=c;break}}},ib=function(){s(this,"aAutoComplete")};function sa(a){S="t";k=M;N(M);w=M;if(!U||A<=0)return;Sa();if(n)s(n,"aAutoComplete");if(a==A||a==-1){r=-1;d.focus();return}else if(a>A){a=0}else if(a<-1){a=A-1}r=a;n=...
f.length;A=h;U=f;pa=h;M=k;if(k==""||h==0){B()}else{Sa()}var g="";if(k.length>0){var l,o;for(var l=0;l<h;l++){for(o=0;o<a.prefixStrings.length;o++){var y=a.prefixStrings[o]+k;if(ha||!aa&&b(f.item(l)).toUpperCase().indexOf(y.toUpperCase())==0||aa&&l==0...
true;break;default:break}if(!wa&&n){var ea=k;s(n,"bAutoComplete");var Q;if(e)Q=b(n).substr(a.prefixStrings[o].length);else Q=ea;if(Q!=c.value){if(c.value!=k)return;if(J){if(c.createTextRange||c.setSelectionRange)N(Q);if(c.createTextRange){var xa=c.cr...
a+"="+b+(c?"; expires="+c.toGMTString():"")+(e?"; path="+e:"")+(f?"; domain="+f:"")+(h?"; secure":"");document.cookie=g}function Ra(){var a=document.body.scrollWidth-220;a=0.73*a;d.size=Math.floor(a/6.18)}function P(a){var b=-1;if(a.createTextRange){...
1);b=a.value.length-c.text.length}else if(a.setSelectionRange){b=a.selectionStart}else{b=-1}return b}function Wa(a){if(a.createTextRange){var b=a.createTextRange();b.moveStart("character",a.value.length);b.select()}else if(a.setSelectionRange){a.setS...
a.style.paddingLeft="3";a.style.paddingRight="3";a.style.height="16px";a.style.overflow="hidden";break;case "a":a.style.backgroundColor="white";a.style.color="black";if(a.displaySpan){a.displaySpan.style.color="green"}break;case "b":a.style.backgroun...
V;a.style.width=100-v+"%";if(x=="query"){a.style.fontSize="10px";a.style.textAlign=V;a.style.color="green";a.style.paddingTop="3px"}else{a.style.color="#696969"}break}}function Ba(){v=65;if(x=="query"){var a=110,b=Ha(),c=(b-a)/b*100;v=c}else{v=65}if(...
h="display: block; margin-"+G+": 0%; width: "+v+"%; float: "+G+";",g="display: block; margin-"+G+": "+v+"%;";if(x=="query"){g+="font-size: 10px; text-align: "+V+"; color: green; padding-top: 3px;"}else{g+="color: #696969;"}z(".mAutoComplete",b);z(".l...
s(f,"aAutoComplete");f.onmousedown=gb;f.onmousemove=hb;f.onmouseout=ib;var h=document.createElement("SPAN");s(h,"lAutoComplete");if(u.substring(0,2)=="zh")h.style.height=d.offsetHeight-4;else h.style.height=d.offsetHeight-6;var g=document.createEleme...
if(c.addRule){c.addRule(a,b)}else if(c.insertRule){c.insertRule(a+" { "+b+" }",c.cssRules.length)}}}function Ja(){var a=null;try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){a=null}}if(!a&&typeo...
1000;break;case 302:case 500:case 502:case 503:I++;break;case 200:var b=q.responseText;if(b.charAt(0)!="<"&&(b.indexOf("sendRPCDone")!=-1||b.indexOf("Suggest_apply")!=-1))eval(b);else D--;default:I=0;break}}};q.send(null)}}function N(a){d.value=a;Z=a...
b){if(a==X&&b==Y){qb()}};function qb(){Fa();sa(r+1)};
( run in 0.242 second using v1.01-cache-2.11-cpan-4d50c553e7e )