Initial YakPanel commit

This commit is contained in:
Niranjan
2026-04-07 02:04:22 +05:30
commit 2826d3e7f3
5359 changed files with 1390724 additions and 0 deletions

View File

@@ -0,0 +1 @@
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(b){b.defineOption("autoRefresh",false,function(d,e){if(d.state.autoRefresh){a(d,d.state.autoRefresh);d.state.autoRefresh=null}if(e&&d.display.wrapper.offsetHeight==0){c(d,d.state.autoRefresh={delay:e.delay||250})}});function c(d,f){function e(){if(d.display.wrapper.offsetHeight){a(d,f);if(d.display.lastWrapHeight!=d.display.wrapper.clientHeight){d.refresh()}}else{f.timeout=setTimeout(e,f.delay)}}f.timeout=setTimeout(e,f.delay);f.hurry=function(){clearTimeout(f.timeout);f.timeout=setTimeout(e,50)};b.on(window,"mouseup",f.hurry);b.on(window,"keyup",f.hurry)}function a(d,e){clearTimeout(e.timeout);b.off(window,"mouseup",e.hurry);b.off(window,"keyup",e.hurry)}});

View File

@@ -0,0 +1 @@
.CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9}

View File

@@ -0,0 +1 @@
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineOption("fullScreen",false,function(d,f,e){if(e==a.Init){e=false}if(!e==!f){return}if(f){b(d)}else{c(d)}});function b(d){var e=d.getWrapperElement();d.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:e.style.width,height:e.style.height};e.style.width="";e.style.height="auto";e.className+=" CodeMirror-fullscreen";document.documentElement.style.overflow="hidden";d.refresh()}function c(d){var e=d.getWrapperElement();e.className=e.className.replace(/\s*CodeMirror-fullscreen\b/,"");document.documentElement.style.overflow="";var f=d.state.fullScreenRestore;e.style.width=f.width;e.style.height=f.height;window.scrollTo(f.scrollLeft,f.scrollTop);d.refresh()}});

View File

@@ -0,0 +1,13 @@
<div>
<p style="margin-bottom:8px"><span style="display: inline-block; width: 104px;">目标URL</span><input class="bt-input-text" type="text" name="toUrl" value="http://" style="margin-left: 5px;width: 380px;height: 30px;margin-right:10px;" placeholder="请填写完整URL,例http://www.test.com"></p>
<p style="margin-bottom:8px"><span style="display: inline-block; width: 104px;">发送域名</span><input class="bt-input-text" type="text" name="toDomain" value="$host" style="margin-left: 5px;width: 380px;height: 30px;margin-right:10px;" placeholder="发送到目标服务器的域名,例www.test.com"></p>
<p style="margin-bottom:8px"><span style="display: inline-block; width: 104px;">内容替换</span><input class="bt-input-text" type="text" name="sub1" value="" style="margin-left: 5px;width: 182px;height: 30px;margin-right:10px;" placeholder="被替换的文本,可留空"><input class="bt-input-text" type="text" name="sub2" value="" style="margin-left: 5px;width: 183px;height: 30px;margin-right:10px;" placeholder="替换为,可留空"></p>
<div class="label-input-group ptb10"><label style="font-weight:normal"><input type="checkbox" name="status" onclick="Proxy('w6.hao.com',1)">启用反向代理</label><label style="margin-left: 18px;"><input type="checkbox" name="status" onclick="OpenCache('w6.hao.com',1)">开启缓存</label></div>
<ul class="help-info-text c7 ptb10">
<li>目标Url必需是可以访问的否则将直接502</li>
<li>默认本站点所有域名访问将被传递到目标服务器,请确保目标服务器已绑定域名</li>
<li>若您是被动代理,请在发送域名处填写上目标站点的域名</li>
<li>若您不需要内容替换功能,请直接留空</li>
<li>可通过purge清理指定URL的缓存,示例http://test.com/purge/test.png</li>
</ul>
</div>

View File

@@ -0,0 +1 @@
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineExtension("addPanel",function(g,f){f=f||{};if(!this.state.panels){b(this)}var h=this.state.panels;var j=h.wrapper;var i=this.getWrapperElement();if(f.after instanceof d&&!f.after.cleared){j.insertBefore(g,f.before.node.nextSibling)}else{if(f.before instanceof d&&!f.before.cleared){j.insertBefore(g,f.before.node)}else{if(f.replace instanceof d&&!f.replace.cleared){j.insertBefore(g,f.replace.node);f.replace.clear()}else{if(f.position=="bottom"){j.appendChild(g)}else{if(f.position=="before-bottom"){j.insertBefore(g,i.nextSibling)}else{if(f.position=="after-top"){j.insertBefore(g,i)}else{j.insertBefore(g,j.firstChild)}}}}}}var e=(f&&f.height)||g.offsetHeight;this._setSize(null,h.heightLeft-=e);h.panels++;return new d(this,g,f,e)});function d(f,h,g,e){this.cm=f;this.node=h;this.options=g;this.height=e;this.cleared=false}d.prototype.clear=function(){if(this.cleared){return}this.cleared=true;var e=this.cm.state.panels;this.cm._setSize(null,e.heightLeft+=this.height);e.wrapper.removeChild(this.node);if(--e.panels==0){c(this.cm)}};d.prototype.changed=function(e){var f=e==null?this.node.offsetHeight:e;var g=this.cm.state.panels;this.cm._setSize(null,g.height+=(f-this.height));this.height=f};function b(f){var h=f.getWrapperElement();var g=window.getComputedStyle?window.getComputedStyle(h):h.currentStyle;var e=parseInt(g.height);var i=f.state.panels={setHeight:h.style.height,heightLeft:e,panels:0,wrapper:document.createElement("div")};h.parentNode.insertBefore(i.wrapper,h);var j=f.hasFocus();i.wrapper.appendChild(h);if(j){f.focus()}f._setSize=f.setSize;if(e!=null){f.setSize=function(m,k){if(k==null){return this._setSize(m,k)}i.setHeight=k;if(typeof k!="number"){var l=/^(\d+\.?\d*)px$/.exec(k);if(l){k=Number(l[1])}else{i.wrapper.style.height=k;k=i.wrapper.offsetHeight;i.wrapper.style.height=""}}f._setSize(m,i.heightLeft+=(k-e));e=k}}}function c(e){var g=e.state.panels;e.state.panels=null;var f=e.getWrapperElement();g.wrapper.parentNode.replaceChild(f,g.wrapper);f.style.height=g.setHeight;e.setSize=e._setSize;e.setSize()}});

View File

@@ -0,0 +1 @@
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(b){b.defineOption("placeholder","",function(g,j,h){var i=h&&h!=b.Init;if(j&&!i){g.on("blur",e);g.on("change",a);g.on("swapDoc",a);a(g)}else{if(!j&&i){g.off("blur",e);g.off("change",a);g.off("swapDoc",a);c(g);var k=g.getWrapperElement();k.className=k.className.replace(" CodeMirror-empty","")}}if(j&&!g.hasFocus()){e(g)}});function c(g){if(g.state.placeholder){g.state.placeholder.parentNode.removeChild(g.state.placeholder);g.state.placeholder=null}}function d(g){c(g);var h=g.state.placeholder=document.createElement("pre");h.style.cssText="height: 0; overflow: visible";h.className="CodeMirror-placeholder";var i=g.getOption("placeholder");if(typeof i=="string"){i=document.createTextNode(i)}h.appendChild(i);g.display.lineSpace.insertBefore(h,g.display.lineSpace.firstChild)}function e(g){if(f(g)){d(g)}}function a(g){var i=g.getWrapperElement(),h=f(g);i.className=i.className.replace(" CodeMirror-empty","")+(h?" CodeMirror-empty":"");if(h){d(g)}else{c(g)}}function f(g){return(g.lineCount()===1)&&(g.getLine(0)==="")}});

View File

@@ -0,0 +1 @@
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(b){b.defineOption("rulers",false,function(c,d){if(c.state.rulerDiv){c.state.rulerDiv.parentElement.removeChild(c.state.rulerDiv);c.state.rulerDiv=null;c.off("refresh",a)}if(d&&d.length){c.state.rulerDiv=c.display.lineSpace.parentElement.insertBefore(document.createElement("div"),c.display.lineSpace);c.state.rulerDiv.className="CodeMirror-rulers";a(c);c.on("refresh",a)}});function a(c){c.state.rulerDiv.textContent="";var k=c.getOption("rulers");var d=c.defaultCharWidth();var j=c.charCoords(b.Pos(c.firstLine(),0),"div").left;c.state.rulerDiv.style.minHeight=(c.display.scroller.offsetHeight+30)+"px";for(var h=0;h<k.length;h++){var g=document.createElement("div");g.className="CodeMirror-ruler";var f,e=k[h];if(typeof e=="number"){f=e}else{f=e.column;if(e.className){g.className+=" "+e.className}if(e.color){g.style.borderColor=e.color}if(e.lineStyle){g.style.borderLeftStyle=e.lineStyle}if(e.width){g.style.borderLeftWidth=e.width}}g.style.left=(j+f*d)+"px";c.state.rulerDiv.appendChild(g)}}});