Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (10 sloc) 19.7 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Bookmarklet - JavaScript Shell Extended</title>
</head>
<body>
<a href="javascript:with(window.open(&quot;&quot;,&quot;_blank&quot;,&quot;width=&quot;+screen.width*.6+&quot;,left=&quot;+screen.width*.35+&quot;,height=&quot;+screen.height*.9+&quot;,resizable,scrollbars=yes&quot;)){document.write(&quot;<!DOCTYPE HTML PUBLIC \&quot;-//W3C//DTD HTML 4.01//EN\&quot; \&quot;http://www.w3.org/TR/html4/strict.dtd\&quot;><html><head><meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html; charset=utf-8\&quot;><title>JavaScript Shell Extended</title><script type=\&quot;text/javascript\&quot; id=\&quot;inputEval\&quot;>function line1EvalShellInput() { _win.eval(\&quot;try{ Shell.printAnswer(eval('with(Shell._scope) with(Shell.shellCommands) { eval(Shell.question) }')); } catch(er) { Shell.printError(er); }; setTimeout(Shell.refocus, 0);\&quot;) }</script>\n<script type=\&quot;text/javascript\&quot;>\n//<![CDATA[\n\nif(typeof JSON==\&quot;undefined\&quot;){eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%25a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c]);return p}('3(!l.m){m={}}(5(){5 f(n){7 n<10?\&quot;0\&quot;+n:n}3(6 V.q.p!==\&quot;5\&quot;){V.q.p=5(a){7 l.1o()+\&quot;-\&quot;+f(l.1p()+1)+\&quot;-\&quot;+f(l.1q())+\&quot;T\&quot;+f(l.1r())+\&quot;:\&quot;+f(l.1s())+\&quot;:\&quot;+f(l.1t())+\&quot;Z\&quot;};L.q.p=1u.q.p=1v.q.p=5(a){7 l.1w()}}w e=/[\\\\1x\\\\W\\\\X-\\\\Y\\\\11\\\\12\\\\13\\\\14-\\\\15\\\\17-\\\\18\\\\19-\\\\1a\\\\1b\\\\1c-\\\\1d]/g,G=/[\\\\\\\\\\\\\&quot;\\\\1y-\\\\1z\\\\1A-\\\\1B\\\\W\\\\X-\\\\Y\\\\11\\\\12\\\\13\\\\14-\\\\15\\\\17-\\\\18\\\\19-\\\\1a\\\\1b\\\\1c-\\\\1d]/g,8,y,1e={\&quot;\\\\b\&quot;:\&quot;\\\\\\\\b\&quot;,\&quot;\\\\t\&quot;:\&quot;\\\\\\\\t\&quot;,\&quot;\\\\n\&quot;:\&quot;\\\\\\\\n\&quot;,\&quot;\\\\f\&quot;:\&quot;\\\\\\\\f\&quot;,\&quot;\\\\r\&quot;:\&quot;\\\\\\\\r\&quot;,\\'\&quot;\\':\\'\\\\\\\\\&quot;\\',\&quot;\\\\\\\\\&quot;:\&quot;\\\\\\\\\\\\\\\\\&quot;},o;5 H(b){G.1f=0;7 G.M(b)?\\'\&quot;\\'+b.z(G,5(a){w c=1e[a];7 6 c===\&quot;I\&quot;?c:\&quot;\\\\\\\\u\&quot;+(\&quot;1g\&quot;+a.1h(0).N(16)).1i(-4)})+\\'\&quot;\\':\\'\&quot;\\'+b+\\'\&quot;\\'}5 A(a,b){w i,k,v,h,B=8,9,2=b[a];3(2&amp;&amp;6 2===\&quot;x\&quot;&amp;&amp;6 2.p===\&quot;5\&quot;){2=2.p(a)}3(6 o===\&quot;5\&quot;){2=o.J(b,a,2)}1C(6 2){C\&quot;I\&quot;:7 H(2);C\&quot;O\&quot;:7 1D(2)?L(2):\&quot;D\&quot;;C\&quot;1E\&quot;:C\&quot;D\&quot;:7 L(2);C\&quot;x\&quot;:3(!2){7\&quot;D\&quot;}8+=y;9=[];3(P.q.N.1F(2)===\&quot;[x 1G]\&quot;){h=2.h;E(i=0;i<h;i+=1){9[i]=A(i,2)||\&quot;D\&quot;}v=9.h===0?\&quot;[]\&quot;:8?\&quot;[\\\\n\&quot;+8+9.K(\&quot;,\\\\n\&quot;+8)+\&quot;\\\\n\&quot;+B+\&quot;]\&quot;:\&quot;[\&quot;+9.K(\&quot;,\&quot;)+\&quot;]\&quot;;8=B;7 v}3(o&amp;&amp;6 o===\&quot;x\&quot;){h=o.h;E(i=0;i<h;i+=1){k=o[i];3(6 k===\&quot;I\&quot;){v=A(k,2);3(v){9.1j(H(k)+(8?\&quot;: \&quot;:\&quot;:\&quot;)+v)}}}}Q{E(k 1k 2){3(P.1l.J(2,k)){v=A(k,2);3(v){9.1j(H(k)+(8?\&quot;: \&quot;:\&quot;:\&quot;)+v)}}}}v=9.h===0?\&quot;{}\&quot;:8?\&quot;{\\\\n\&quot;+8+9.K(\&quot;,\\\\n\&quot;+8)+\&quot;\\\\n\&quot;+B+\&quot;}\&quot;:\&quot;{\&quot;+9.K(\&quot;,\&quot;)+\&quot;}\&quot;;8=B;7 v}}3(6 m.R!==\&quot;5\&quot;){m.R=5(a,b,c){w i;8=\&quot;\&quot;;y=\&quot;\&quot;;3(6 c===\&quot;O\&quot;){E(i=0;i<c;i+=1){y+=\&quot; \&quot;}}Q{3(6 c===\&quot;I\&quot;){y=c}}o=b;3(b&amp;&amp;6 b!==\&quot;5\&quot;&amp;&amp;(6 b!==\&quot;x\&quot;||6 b.h!==\&quot;O\&quot;)){1m 1n 1H(\&quot;m.R\&quot;)}7 A(\&quot;\&quot;,{\&quot;\&quot;:a})}}3(6 m.S!==\&quot;5\&quot;){m.S=5(c,d){w j;5 U(a,b){w k,v,2=a[b];3(2&amp;&amp;6 2===\&quot;x\&quot;){E(k 1k 2){3(P.1l.J(2,k)){v=U(2,k);3(v!==1I){2[k]=v}Q{1J 2[k]}}}}7 d.J(a,b,2)}e.1f=0;3(e.M(c)){c=c.z(e,5(a){7\&quot;\\\\\\\\u\&quot;+(\&quot;1g\&quot;+a.1h(0).N(16)).1i(-4)})}3(/^[\\\\],:{}\\\\s]*$/.M(c.z(/\\\\\\\\(?:[\&quot;\\\\\\\\\\\\/1K]|u[0-1L-1M-F]{4})/g,\&quot;@\&quot;).z(/\&quot;[^\&quot;\\\\\\\\\\\\n\\\\r]*\&quot;|1N|1O|D|-?\\\\d+(?:\\\\.\\\\d*)?(?:[1P][+\\\\-]?\\\\d+)?/g,\&quot;]\&quot;).z(/(?:^|:|,)(?:\\\\s*\\\\[)+/g,\&quot;\&quot;))){j=1Q(\&quot;(\&quot;+c+\&quot;)\&quot;);7 6 d===\&quot;5\&quot;?U({\&quot;\&quot;:j},\&quot;\&quot;):j}1m 1n 1R(\&quot;m.S\&quot;)}}})();',62,116,'||value|if||function|typeof|return|gap|partial||||||||length||||this|JSON||rep|toJSON|prototype||||||var|object|indent|replace|str|mind|case|null|for||escapable|quote|string|call|join|String|test|toString|number|Object|else|stringify|parse||walk|Date|u00ad|u0600|u0604|||u070f|u17b4|u17b5|u200c|u200f||u2028|u202f|u2060|u206f|ufeff|ufff0|uffff|meta|lastIndex|0000|charCodeAt|slice|push|in|hasOwnProperty|throw|new|getUTCFullYear|getUTCMonth|getUTCDate|getUTCHours|getUTCMinutes|getUTCSeconds|Number|Boolean|valueOf|u0000|x00|x1f|x7f|x9f|switch|isFinite|boolean|apply|Array|Error|undefined|delete|bfnrt|9a|fA|true|false|eE|eval|SyntaxError'.split('|'),0,{}));}\nvar\nhistList=[\&quot;\&quot;],histPos=0,_scope={},_win,question,_in,_out,tooManyMatches=null,lastError=null;function _JS_version_check(start,end){var scripts=[];if(typeof start==\&quot;undefined\&quot;)var start=_JS_version_check.start;if(typeof end==\&quot;undefined\&quot;)var end=_JS_version_check.end;for(var i=start;i<=end;i++){var s=document.createElement(\&quot;script\&quot;);s.type=\&quot;application/javascript;version=\&quot;+parseFloat((i/10).toFixed(1)).toString();s.src=\&quot;data:application/javascript,\&quot;+encodeURIComponent(_JS_version_check.code+\&quot;;\\nvar JavaScript_version = \&quot;+parseFloat((i/10).toFixed(1)).toString());document.getElementsByTagName(\&quot;head\&quot;)[0].appendChild(s);scripts.push(s);}\nfor(var i=0;i<scripts.length;i++){document.getElementsByTagName(\&quot;head\&quot;)[0].removeChild(scripts[i]);}}\n_JS_version_check.start=10;_JS_version_check.end=20;_JS_version_check.code=document.getElementById(\&quot;inputEval\&quot;).innerHTML;_JS_version_check();function refocus(){_in.blur();_in.focus();}\nfunction init(){_in=document.getElementById(\&quot;input\&quot;);_out=document.getElementById(\&quot;output\&quot;);_win=window;if(opener&amp;&amp;!opener.closed){println(\&quot;Using bookmarklet version of shell: commands will run in opener's context.\&quot;,\&quot;message\&quot;);_win=opener;}\ninitTarget();recalculateInputHeight();refocus();}\nfunction initTarget(){_win.Shell=window;_win.print=shellCommands.print;}\nfunction keepFocusInTextbox(e){var g=false;if(typeof e.target!=\&quot;undefined\&quot;){g=e.target;}\nelse if(typeof e.srcElement!=\&quot;undefined\&quot;){g=e.srcElement;}\nif(g){while(!g.tagName)\ng=g.parentNode;var t=g.tagName.toUpperCase();if(t==\&quot;A\&quot;||t==\&quot;INPUT\&quot;)\nreturn;if(window.getSelection){if(String(window.getSelection()))\nreturn;}\nelse if(document.getSelection){if(document.getSelection())\nreturn;}\nelse{if(document.selection.createRange().text)\nreturn;}}\nrefocus();}\nfunction inputKeydown(e){if(e.shiftKey&amp;&amp;e.keyCode==13){}else if(e.keyCode==13){try{go();}catch(er){alert(er);};setTimeout(function(){_in.value=\&quot;\&quot;;},0);}else if(e.keyCode==38){if(e.ctrlKey||caretInFirstLine(_in))\nhist(true);}else if(e.keyCode==40){if(e.ctrlKey||caretInLastLine(_in))\nhist(false);}else if(e.keyCode==9){tabcomplete();setTimeout(function(){refocus();},0);}else{}\nsetTimeout(recalculateInputHeight,0);};function caretInFirstLine(textbox){if(textbox.selectionStart==undefined)\nreturn true;var firstLineBreak=textbox.value.indexOf(\&quot;\\n\&quot;);return((firstLineBreak==-1)||(textbox.selectionStart<=firstLineBreak));}\nfunction caretInLastLine(textbox){if(textbox.selectionEnd==undefined)\nreturn true;var lastLineBreak=textbox.value.lastIndexOf(\&quot;\\n\&quot;);return(textbox.selectionEnd>lastLineBreak);}\nfunction recalculateInputHeight(){var rows=_in.value.split(/\\n/).length\n+1\n+(window.opera?1:0);if(_in.rows!=rows)\n_in.rows=rows;}\nfunction println(s,type){if((s=String(s))){var newdiv=document.createElement(\&quot;div\&quot;);newdiv.appendChild(document.createTextNode(s));newdiv.className=type;_out.appendChild(newdiv);return newdiv;}}\nfunction printWithRunin(h,s,type){var div=println(s,type);var head=document.createElement(\&quot;strong\&quot;);head.appendChild(document.createTextNode(h+\&quot;: \&quot;));div.insertBefore(head,div.firstChild);}\nvar shellCommands={load:function load(uri,printLoadMsg,forcedVersion){if(typeof printLoadMsg==\&quot;undefined\&quot;)printLoadMsg=true;if(Object.prototype.toString.call(uri)==\&quot;[object Array]\&quot;){for(var i=0,len=uri.length; i < len; i++){load(uri[i],false,forcedVersion);};if(printLoadMsg)println(\&quot;Loading \&quot;+uri.join(\&quot;, \&quot;)+\&quot;...\&quot;,\&quot;message\&quot;);return;}\nvar s=_win.document.createElement(\&quot;script\&quot;);s.type=\&quot;text/javascript\&quot;;if(typeof forcedVersion==\&quot;number\&quot;)s.type+=\&quot;;version=\&quot;+forcedVersion.toString();else if(typeof JavaScript_version!=\&quot;undefined\&quot;&amp;&amp;typeof forcedVersion==\&quot;undefined\&quot;)s.type+=\&quot;;version=\&quot;+JavaScript_version.toString();s.src=uri;_win.document.getElementsByTagName(\&quot;head\&quot;)[0].appendChild(s);if(printLoadMsg)println(\&quot;Loading \&quot;+uri+\&quot;...\&quot;,\&quot;message\&quot;);},clear:function clear(){while(_out.childNodes[0])\n_out.removeChild(_out.childNodes[0]);},print:function print(){println(Array.prototype.slice.call(arguments).join(\&quot; \&quot;),\&quot;print\&quot;);},pr:function pr(s){shellCommands.print(s);return s;},props:function props(e,onePerLine){if(e===null){println(\&quot;props called with null argument\&quot;,\&quot;error\&quot;);return;}\nif(e===undefined){println(\&quot;props called with undefined argument\&quot;,\&quot;error\&quot;);return;}\nvar ns=[\&quot;Methods\&quot;,\&quot;Fields\&quot;,\&quot;Unreachables\&quot;];var as=[[],[],[]];var p,j,i;var protoLevels=0;for(p=e;p;p=p.__proto__){for(i=0;i<ns.length;++i)\nas[i][protoLevels]=[];++protoLevels;}\nfor(var a in e){var protoLevel=-1;try\n{for(p=e;p&amp;&amp;(a in p);p=p.__proto__)\n++protoLevel;}\ncatch(er){protoLevel=0;}\nvar type=1;try{if((typeof e[a])==\&quot;function\&quot;)\ntype=0;}\ncatch(er){type=2;}\nas[type][protoLevel].push(a);}\nfunction times(s,n){return n?s+times(s,n-1):\&quot;\&quot;;}\nfor(j=0;j<protoLevels;++j)\nfor(i=0;i<ns.length;++i)\nif(as[i][j].length)\nprintWithRunin(ns[i]+times(\&quot; of prototype\&quot;,j),(onePerLine?\&quot;\\n\\n\&quot;:\&quot;\&quot;)+as[i][j].sort().join(onePerLine?\&quot;\\n\&quot;:\&quot;, \&quot;)+(onePerLine?\&quot;\\n\\n\&quot;:\&quot;\&quot;),\&quot;propList\&quot;);},blink:function blink(node){if(!node)throw(\&quot;blink: argument is null or undefined.\&quot;);if(node.nodeType==null)throw(\&quot;blink: argument must be a node.\&quot;);if(node.nodeType==3)throw(\&quot;blink: argument must not be a text node\&quot;);if(node.documentElement)throw(\&quot;blink: argument must not be the document object\&quot;);function setOutline(o){return function(){if(node.style.outline!=node.style.bogusProperty){node.style.outline=o;}\nelse if(node.style.MozOutline!=node.style.bogusProperty){node.style.MozOutline=o;}\nelse{node.style.border=o;}}}\nfunction focusIt(a){return function(){a.focus();}}\nif(node.ownerDocument){var windowToFocusNow=(node.ownerDocument.defaultView||node.ownerDocument.parentWindow);if(windowToFocusNow)\nsetTimeout(focusIt(windowToFocusNow.top),0);}\nfor(var i=1;i<7;++i)\nsetTimeout(setOutline((i%252)?'3px solid red':'none'),i*100);setTimeout(focusIt(window),800);setTimeout(focusIt(_in),810);},scope:function scope(sc){if(!sc)sc={};_scope=sc;println(\&quot;Scope is now \&quot;+sc+\&quot;. If a variable is not found in this scope, window will also be searched. New variables will still go on window.\&quot;,\&quot;message\&quot;);},mathHelp:function mathHelp(){printWithRunin(\&quot;Math constants\&quot;,\&quot;E, LN2, LN10, LOG2E, LOG10E, PI, SQRT1_2, SQRT2\&quot;,\&quot;propList\&quot;);printWithRunin(\&quot;Math methods\&quot;,\&quot;abs, acos, asin, atan, atan2, ceil, cos, exp, floor, log, max, min, pow, random, round, sin, sqrt, tan\&quot;,\&quot;propList\&quot;);},ans:undefined};function hist(up){var L=histList.length;if(L==1)\nreturn;if(up){if(histPos==L-1){histList[histPos]=_in.value;}\nif(histPos>0){histPos--;setTimeout(function(){_in.value='';_in.value=histList[histPos];var caretPos=_in.value.length;if(_in.setSelectionRange)\n_in.setSelectionRange(caretPos,caretPos);},0);}}\nelse{if(histPos<L-1){histPos++;_in.value=histList[histPos];}\nelse if(histPos==L-1){if(_in.value){histList[histPos]=_in.value;++histPos;_in.value=\&quot;\&quot;;}}}}\nfunction tabcomplete(){function findbeginning(s,from,stopAtDot){function equalButNotEscaped(s,i,q){if(s.charAt(i)!=q)\nreturn false;if(i==0)\nreturn true;if(s.charAt(i-1)=='\\\\')\nreturn false;return true;}\nvar nparens=0;var i;for(i=from;i>=0;i--){if(s.charAt(i)==' ')\nbreak;if(stopAtDot&amp;&amp;s.charAt(i)=='.')\nbreak;if(s.charAt(i)==')')\nnparens++;else if(s.charAt(i)=='(')\nnparens--;if(nparens<0)\nbreak;if(s.charAt(i)=='\\''||s.charAt(i)=='\\\&quot;'){var quot=s.charAt(i);i--;while(i>=0&amp;&amp;!equalButNotEscaped(s,i,quot)){i--;}}}\nreturn i;}\nfunction getcaretpos(inp){if(inp.selectionEnd!=null)\nreturn inp.selectionEnd;if(inp.createTextRange){var docrange=_win.Shell.document.selection.createRange();var inprange=inp.createTextRange();if(inprange.setEndPoint)\n{inprange.setEndPoint('EndToStart',docrange);return inprange.text.length;}}\nreturn inp.value.length;}\nfunction setselectionto(inp,pos){if(inp.selectionStart){inp.selectionStart=inp.selectionEnd=pos;}\nelse if(inp.createTextRange){var docrange=_win.Shell.document.selection.createRange();var inprange=inp.createTextRange();inprange.move('character',pos);inprange.select();}\nelse{}}\nvar caret=getcaretpos(_in);if(caret){var dotpos,spacepos,complete,obj;dotpos=findbeginning(_in.value,caret-1,true);if(dotpos==-1||_in.value.charAt(dotpos)!='.'){dotpos=caret;}\nspacepos=findbeginning(_in.value,dotpos-1,false);if(spacepos==dotpos||spacepos+1==dotpos||dotpos==caret){if(_in.value.charAt(dotpos)=='('||(_in.value.charAt(spacepos)=='('&amp;&amp;(spacepos+1)==dotpos))\n{var fn,fname;var from=(_in.value.charAt(dotpos)=='(')?dotpos:spacepos;spacepos=findbeginning(_in.value,from-1,false);fname=_in.value.substr(spacepos+1,from-(spacepos+1));try{with(_win.Shell._scope)\nwith(_win)\nwith(Shell.shellCommands)\nfn=eval(fname);}\ncatch(er){return;}\nif(fn==undefined){return;}\nif(fn instanceof Function){if(!fn.toString().match(/function .+?\\(\\) +\\{\\n +\\[native code\\]\\n\\}/))\nprintln(fn.toString().match(/function .+?\\(.*?\\)/),\&quot;tabcomplete\&quot;);}\nreturn;}\nelse\nobj=_win;}\nelse{var objname=_in.value.substr(spacepos+1,dotpos-(spacepos+1));try{with(_win.Shell._scope)\nwith(_win)\nobj=eval(objname);}\ncatch(er){printError(er);return;}\nif(obj==undefined){return;}}\nif(dotpos==caret){if(spacepos+1==dotpos||spacepos==dotpos){return;}\ncomplete=_in.value.substr(spacepos+1,dotpos-(spacepos+1));}\nelse{complete=_in.value.substr(dotpos+1,caret-(dotpos+1));}\nvar matches=[];var bestmatch=null;for(var a in obj){if(a.substr(0,complete.length)==complete){matches.push(a);if(bestmatch==null){bestmatch=a;}\nelse{function min(a,b){return((a<b)?a:b);}\nvar i;for(i=0;i<min(bestmatch.length,a.length);i++){if(bestmatch.charAt(i)!=a.charAt(i))\nbreak;}\nbestmatch=bestmatch.substr(0,i);}}}\nbestmatch=(bestmatch||\&quot;\&quot;);var objAndComplete=(objname||obj)+\&quot;.\&quot;+bestmatch;if(matches.length>1&amp;&amp;(tooManyMatches==objAndComplete||matches.length<=10)){printWithRunin(\&quot;Matches: \&quot;,matches.join(', '),\&quot;tabcomplete\&quot;);tooManyMatches=null;}\nelse if(matches.length>10){println(matches.length+\&quot; matches. Press tab again to see them all\&quot;,\&quot;tabcomplete\&quot;);tooManyMatches=objAndComplete;}\nelse{tooManyMatches=null;}\nif(bestmatch!=\&quot;\&quot;){var sstart;if(dotpos==caret){sstart=spacepos+1;}\nelse{sstart=dotpos+1;}\n_in.value=_in.value.substr(0,sstart)\n+bestmatch\n+_in.value.substr(caret);setselectionto(_in,caret+(bestmatch.length-complete.length));}}}\nfunction printQuestion(q){println(q,\&quot;input\&quot;);}\nfunction printAnswer(a){if(a!==undefined){println(a,\&quot;normalOutput\&quot;);shellCommands.ans=a;}}\nfunction printError(er){var lineNumberString;lastError=er;if(er.name)\n{lineNumberString=(er.lineNumber!=undefined)?(\&quot; on line \&quot;+er.lineNumber+\&quot;: \&quot;):\&quot;: \&quot;;println(er.name+lineNumberString+er.message,\&quot;error\&quot;);}\nelse\nprintln(er,\&quot;error\&quot;);}\nfunction go(s){_in.value=question=s?s:_in.value;if(question==\&quot;\&quot;)\nreturn;histList[histList.length-1]=question;histList[histList.length]=\&quot;\&quot;;histPos=histList.length-1;_in.value='';recalculateInputHeight();printQuestion(question);if(_win.closed){printError(\&quot;Target window has been closed.\&quot;);return;}\ntry{(\&quot;Shell\&quot;in _win)}\ncatch(er){printError(\&quot;The JavaScript Shell cannot access variables in the target window. The most likely reason is that the target window now has a different page loaded and that page has a different hostname than the original page.\&quot;);return;}\nif(!(\&quot;Shell\&quot;in _win))\ninitTarget();line1EvalShellInput();}\nif(typeof console!=\&quot;object\&quot;)var console={};if(typeof console.log!=\&quot;function\&quot;&amp;&amp;typeof print==\&quot;function\&quot;)console.log=function(){Shell.shellCommands.print.apply(this,Array.prototype.slice.call(arguments))}\nwindow.onload=init;document.onclick=function(e){keepFocusInTextbox(e)};\n//]]>\n</script>\n\n<style type=\&quot;text/css\&quot;>\nbody { background: white; color: black; }\n\n#output { white-space: pre; white-space: -moz-pre-wrap; } /* Preserve line breaks, but wrap too if browser supports it */\nh3 { margin-top: 0; margin-bottom: 0em; }\nh3 + div { margin: 0; }\n\nform { margin: 0; padding: 0; }\n#input { width: 100%25; border: none; padding: 0; overflow: auto; }\n\n.input { color: blue; background: white; font: inherit; font-weight: bold; margin-top: .5em; /* background: #E6E6FF; */ }\n.normalOutput { color: black; background: white; }\n.print { color: brown; background: white; }\n.error { color: red; background: white; }\n.propList { color: green; background: white; }\n.message { color: green; background: white; }\n.tabcomplete { color: purple; background: white; }\n</style>\n</head>\n\n<body>\n\n<h3>JavaScript Shell Extended</h3>\n<div>Features: autocompletion of property names with Tab, multiline input with Shift+Enter, input history with (Ctrl+) Up/Down, <a accesskey=\&quot;M\&quot; href=\&quot;#\&quot; onclick=\&quot;go('scope(Math); mathHelp();');return false;\&quot; title=\&quot;Accesskey: M\&quot;>Math</a>, <a accesskey=\&quot;H\&quot; href=\&quot;http://code.eligrey.com/shell/help.html\&quot; title=\&quot;Accesskey: H\&quot;>help</a></div><div>Values and functions: ans, print(string), <a accesskey=\&quot;P\&quot; href=\&quot;#\&quot; onclick=\&quot;go('props(ans)');return false;\&quot; title=\&quot;Accesskey: P\&quot;>props(object)</a>, <a accesskey=\&quot;B\&quot; href=\&quot;#\&quot; onclick=\&quot;go('blink(ans)');return false\&quot; title=\&quot;Accesskey: B\&quot;>blink(node)</a>, <a accesskey=\&quot;C\&quot; href=\&quot;#\&quot; onclick=\&quot;go('clear()');return false;\&quot; title=\&quot;Accesskey: C\&quot;>clear()</a>, load(scriptURL), scope(object), JSON.parse(JSON string), <a accesskey=\&quot;J\&quot; href=\&quot;#\&quot; onclick=\&quot;go('JSON.stringify(ans)');return false;\&quot; title=\&quot;Accesskey: J\&quot;>JSON.stringify(object)</a></div>\n<div id=\&quot;output\&quot;></div>\n\n<div><textarea id=\&quot;input\&quot; class=\&quot;input\&quot; wrap=\&quot;off\&quot; onkeydown=\&quot;inputKeydown(event)\&quot; rows=\&quot;1\&quot;></textarea></div>\n</body>\n</html>&quot;);document.close();}void 0" id="idconstructedlink">shell</a>
</body>
</html>