Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Siubaak committed Jan 23, 2019
1 parent 8cd499e commit 6701f7a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/index.html
@@ -1 +1,8 @@
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, shrink-to-fit=no"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Kurge</title><link rel="stylesheet" href="site.css"><link rel="icon" href="favicon.ico" type="image/x-icon"/><link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/></head><body><div id="app"></div><script src="proxy.polyfill.js"></script><script src="site.js"></script></body></html>
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, shrink-to-fit=no"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Kurge</title><link rel="stylesheet" href="site.css"><link rel="icon" href="favicon.ico" type="image/x-icon"/><link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/></head><body><div id="app"></div>
<script>!function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(1);window.oConsole=n.default,e.default=n.default},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),i=o(3),r=function(){function t(){this._createNodes(),this._overwriteNativeMethods(),this._setErrorListener()}return t.prototype._setErrorListener=function(){var t=window.onerror;window.onerror=function(e,o,n,r,s){return t&&t(e,o,n,r,s),!!i.getNode("panel")&&(s&&s.stack&&!~s.stack.indexOf("HTMLInputElement._inputNode.onkeydown")?console.error(s.stack):console.error(e),!0)}},t.prototype._overwriteNativeMethods=function(){for(var t=0,e=n.SUPPORTED_METHODS;t<e.length;t++){var o=e[t];this["_"+o]=console[o].bind(console),console[o]=this._print(o).bind(this)}},t.prototype._createNodes=function(){var t=this;this._consoleNode=document.createElement("div"),this._consoleNode.setAttribute("onscreenconsole-id","panel"),this._consoleNode.style.cssText="\n\t\t\tcursor: default;\n\t\t\tposition: fixed;\n\t\t\tz-index: 995;\n\t\t\theight: 240px;\n\t\t\twidth: 100%;\n\t\t\tbottom: -250px;\n\t\t\tleft: 0;\n\t\t\toverflow: scroll;\n\t\t\tbackground-color: #fff;\n\t\t\t-webkit-box-shadow: 0 -5px 10px #00000033;\n\t\t\t\t\t\t\tbox-shadow: 0 -5px 10px #00000033;\n\t\t\t-webkit-box-sizing: border-box;\n\t\t\t\t\t\t\tbox-sizing: border-box;\n\t\t\ttransition: all .2s;\n\t\t",this._showBtn=document.createElement("button"),this._showBtn.setAttribute("onscreenconsole-id","show"),this._showBtn.style.cssText="\n\t\t\tposition: fixed;\n\t\t\tz-index: 990;\n\t\t\theight: 32px;\n\t\t\twidth: 48px;\n\t\t\tbottom: 6px;\n\t\t\tright: 6px;\n\t\t\tcolor: #0089A7;\n\t\t\tborder: 1px solid #0089A7;\n\t\t\tbackground-color: #fff;\n\t\t\tcursor: pointer;\n\t\t\t-webkit-box-shadow: 0 2px 5px #00000033;\n\t\t\t\t\t\t\tbox-shadow: 0 2px 5px #00000033;\n\t\t\ttransition: all .2s;\n\t\t",this._showBtn.innerHTML="Show",this._showBtn.onclick=this.show.bind(this),this._hideBtn=document.createElement("button"),this._hideBtn.style.cssText="\n\t\t\tposition: fixed;\n\t\t\tz-index: 999;\n\t\t\theight: 32px;\n\t\t\twidth: 48px;\n\t\t\tbottom: 6px;\n\t\t\tright: 6px;\n\t\t\tcolor: #0089A7;\n\t\t\tborder: 1px solid #0089A7;\n\t\t\tbackground-color: #fff;\n\t\t\tcursor: pointer;\n\t\t\t-webkit-box-shadow: 0 2px 5px #00000033;\n\t\t\t\t\t\t\tbox-shadow: 0 2px 5px #00000033;\n\t\t\ttransition: all .2s;\n\t\t",this._hideBtn.innerHTML="Hide",this._hideBtn.onclick=this.hide.bind(this),this._consoleNode.appendChild(this._hideBtn),this._inputNode=document.createElement("input"),this._inputNode.placeholder=">",this._inputNode.style.cssText="\n\t\t\toverflow: scroll;\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-size: 14px;\n\t\t\tborder: none;\n\t\t\toutline: none;\n\t\t\tresize: none;\n\t\t\tborder-top: 1px solid #00000033;\n\t\t\twidth: 100%;\n\t\t\t-webkit-box-sizing: border-box;\n\t\t\t\t\t\t\tbox-sizing: border-box;\n\t\t";var e=JSON.parse(localStorage.getItem("onscreen-console-history")),o=-1;Array.isArray(e)?o=e.length:e=[],this._inputNode.onkeydown=function(i){var r=i.target.value;if(13===i.keyCode&&""!==r){console.log('<span style="color: #00000055">></span> '+r);var s=document.createElement("script");for(s.innerHTML=r,document.body.appendChild(s),s.remove(),e.push(r);e.length>n.MAX_HISTORY_LENGTH;)e.shift();localStorage.setItem("onscreen-console-history",JSON.stringify(e)),t._inputNode.value="",o=e.length}else 38===i.keyCode?o>0?(o--,t._inputNode.value=e[o]):0===o&&(t._inputNode.value=e[o]):40===i.keyCode&&(o<e.length-1?(o++,t._inputNode.value=e[o]):o===e.length-1&&(o++,t._inputNode.value=""))},this._consoleNode.appendChild(this._inputNode)},t.prototype._print=function(t){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var r=i.getNode("panel");if(r){var s=document.createElement("div");s.style.cssText="\n min-height: 20px;\n font-size: 14px;\n color: "+n.SUPPORTED_COLORS[t]+";\n background-color: "+n.SUPPORTED_COLORS[t]+"11;\n border-top: 1px solid "+n.SUPPORTED_COLORS[t]+"33;\n padding: 6px 12px;\n ";for(var d=[],l=0,c=e;l<c.length;l++){var u=c[l];d.push(i.format(u))}s.innerHTML=d.join(" "),this._consoleNode.insertBefore(s,this._inputNode),this._consoleNode.scrollTop=r.scrollHeight}else this["_"+t].apply(this,e)}},t.prototype.enable=function(){i.getNode("panel")||document.body.appendChild(this._consoleNode),i.getNode("show")||document.body.appendChild(this._showBtn)},t.prototype.disable=function(){var t=i.getNode("panel");t&&t.remove();var e=i.getNode("show");e&&e.remove()},t.prototype.show=function(){i.getNode("panel")&&"0px"!==this._consoleNode.style.bottom&&(this._consoleNode.style.bottom="0px",this._hideBtn.style.bottom="6px")},t.prototype.hide=function(){i.getNode("panel")&&"0px"===this._consoleNode.style.bottom&&(this._consoleNode.style.bottom=-this._consoleNode.offsetHeight-10+"px",this._hideBtn.style.bottom=-this._consoleNode.offsetHeight-4+"px")},t}();e.default=new r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_HISTORY_LENGTH=20,e.MAX_LOG_LENGTH=100,e.SUPPORTED_COLORS={log:"#0B1013",warn:"#C99833",error:"#CB1B45"},e.SUPPORTED_METHODS=Object.keys(e.SUPPORTED_COLORS)},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={"[object Undefined]":function(){return"undefined"},"[object Null]":function(){return"null"},"[object Number]":function(t){return t.toString()},"[object String]":function(t){return t.toString()},"[object Boolean]":function(t){return t?"true":"false"},"[object Symbol]":function(t){return"Symbol("+t+")"},"[object Function]":function(t){return t.toString()},"[object Array]":function(t){return"["+t.join(", ")+"]"},"[object Object]":function(t){return JSON.stringify(t)}};e.format=function(t){return n[function(t){return Object.prototype.toString.call(t)}(t)](t)},e.getNode=function(t){return document.querySelector('[onscreenconsole-id="'+t+'"]')}}]);</script>
<script>
oConsole.enable();
oConsole.show();
delete window.Proxy
</script>
<script src="proxy.polyfill.js"></script><script src="site.js"></script></body></html>

0 comments on commit 6701f7a

Please sign in to comment.