Greasy Fork

Greasy Fork is available in English.

请求代理

请求代理,可以修改任意请求的url

当前为 2020-10-30 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         请求代理
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @description  请求代理,可以修改任意请求的url
// @author       崮生 [email protected]
// @include      *
// @grant        unsafeWindow
// @grant        GM.setValue
// @grant        GM.getValue
// @grant        GM.xmlHttpRequest
// @run-at       document-start
// @connect      shenzilong.cn
// ==/UserScript==
// 这些代码都来自github actions 编译后的代码,不编译版本体积太大,不放心的欢迎去 https://github.com/2234839/userJS 审查代码, 

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=16)}([function(t,e,n){"use strict";(function(t){function r(){}n.d(e,"a",(function(){return T})),n.d(e,"b",(function(){return jt})),n.d(e,"c",(function(){return tt})),n.d(e,"d",(function(){return Z})),n.d(e,"e",(function(){return W})),n.d(e,"f",(function(){return w})),n.d(e,"g",(function(){return i})),n.d(e,"h",(function(){return P})),n.d(e,"i",(function(){return vt})),n.d(e,"j",(function(){return U})),n.d(e,"k",(function(){return lt})),n.d(e,"l",(function(){return p})),n.d(e,"m",(function(){return z})),n.d(e,"n",(function(){return I})),n.d(e,"o",(function(){return _t})),n.d(e,"p",(function(){return wt})),n.d(e,"q",(function(){return bt})),n.d(e,"r",(function(){return xt})),n.d(e,"s",(function(){return O})),n.d(e,"t",(function(){return x})),n.d(e,"u",(function(){return j})),n.d(e,"v",(function(){return gt})),n.d(e,"w",(function(){return N})),n.d(e,"x",(function(){return h})),n.d(e,"y",(function(){return ft})),n.d(e,"z",(function(){return o})),n.d(e,"A",(function(){return Ot})),n.d(e,"B",(function(){return $})),n.d(e,"C",(function(){return a})),n.d(e,"D",(function(){return C})),n.d(e,"E",(function(){return $t})),n.d(e,"F",(function(){return r})),n.d(e,"G",(function(){return c})),n.d(e,"H",(function(){return f})),n.d(e,"I",(function(){return M})),n.d(e,"J",(function(){return q})),n.d(e,"K",(function(){return H})),n.d(e,"L",(function(){return k})),n.d(e,"M",(function(){return d})),n.d(e,"N",(function(){return E})),n.d(e,"O",(function(){return dt})),n.d(e,"P",(function(){return ht})),n.d(e,"Q",(function(){return yt}));const o=t=>t;function i(t,e){for(const n in e)t[n]=e[n];return t}function u(t){return t()}function s(){return Object.create(null)}function c(t){t.forEach(u)}function a(t){return"function"==typeof t}function f(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t){return 0===Object.keys(t).length}function d(t,...e){if(null==t)return r;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function h(t){let e;return d(t,t=>e=t)(),e}function p(t,e,n){t.$$.on_destroy.push(d(e,n))}const _="undefined"!=typeof window;let b=_?()=>window.performance.now():()=>Date.now(),g=_?t=>requestAnimationFrame(t):r;const y=new Set;function m(t){y.forEach(e=>{e.c(t)||(y.delete(e),e.f())}),0!==y.size&&g(m)}function v(t){let e;return 0===y.size&&g(m),{promise:new Promise(n=>{y.add(e={c:t,f:n})}),abort(){y.delete(e)}}}function w(t,e){t.appendChild(e)}function $(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function O(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function j(t){return document.createElement(t)}function E(t){return document.createTextNode(t)}function k(){return E(" ")}function C(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function P(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function M(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function q(t,e){t.value=null==e?"":e}function H(t,e,n,r){t.style.setProperty(e,n,r?"important":"")}function R(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}class T{constructor(t=null){this.a=t,this.e=this.n=null}m(t,e,n=null){this.e||(this.e=j(e.nodeName),this.t=e,this.h(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)$(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(x)}}const L=new Set;let S,A=0;function D(t,e,n,r,o,i,u,s=0){const c=16.666/r;let a="{\n";for(let t=0;t<=1;t+=c){const r=e+(n-e)*i(t);a+=100*t+`%{${u(r,1-r)}}\n`}const f=a+`100% {${u(n,1-n)}}\n}`,l=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(f)}_${s}`,d=t.ownerDocument;L.add(d);const h=d.__svelte_stylesheet||(d.__svelte_stylesheet=d.head.appendChild(j("style")).sheet),p=d.__svelte_rules||(d.__svelte_rules={});p[l]||(p[l]=!0,h.insertRule(`@keyframes ${l} ${f}`,h.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?_+", ":""}${l} ${r}ms linear ${o}ms 1 both`,A+=1,l}function B(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),o=n.length-r.length;o&&(t.style.animation=r.join(", "),A-=o,A||g(()=>{A||(L.forEach(t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}}),L.clear())}))}function I(t,e,n,i){if(!e)return r;const u=t.getBoundingClientRect();if(e.left===u.left&&e.right===u.right&&e.top===u.top&&e.bottom===u.bottom)return r;const{delay:s=0,duration:c=300,easing:a=o,start:f=b()+s,end:l=f+c,tick:d=r,css:h}=n(t,{from:e,to:u},i);let p,_=!0,g=!1;function y(){h&&B(t,p),_=!1}return v(t=>{if(!g&&t>=f&&(g=!0),g&&t>=l&&(d(1,0),y()),!_)return!1;if(g){const e=0+1*a((t-f)/c);d(e,1-e)}return!0}),h&&(p=D(t,0,1,c,s,a,h)),s||(g=!0),d(0,1),y}function N(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:n,height:r}=e,o=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=r,W(t,o)}}function W(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const r=getComputedStyle(t),o="none"===r.transform?"":r.transform;t.style.transform=`${o} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}function F(t){S=t}function X(){if(!S)throw new Error("Function called outside component initialization");return S}function z(){const t=X();return(e,n)=>{const r=t.$$.callbacks[e];if(r){const o=R(e,n);r.slice().forEach(e=>{e.call(t,o)})}}}const K=[],U=[],J=[],G=[],Q=Promise.resolve();let V=!1;function Y(){V||(V=!0,Q.then(rt))}function Z(t){J.push(t)}function tt(t){G.push(t)}let et=!1;const nt=new Set;function rt(){if(!et){et=!0;do{for(let t=0;t<K.length;t+=1){const e=K[t];F(e),ot(e.$$)}for(F(null),K.length=0;U.length;)U.pop()();for(let t=0;t<J.length;t+=1){const e=J[t];nt.has(e)||(nt.add(e),e())}J.length=0}while(K.length);for(;G.length;)G.pop()();V=!1,et=!1,nt.clear()}}function ot(t){if(null!==t.fragment){t.update(),c(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Z)}}let it;function ut(){return it||(it=Promise.resolve(),it.then(()=>{it=null})),it}function st(t,e,n){t.dispatchEvent(R(`${e?"intro":"outro"}${n}`))}const ct=new Set;let at;function ft(){at={r:0,c:[],p:at}}function lt(){at.r||c(at.c),at=at.p}function dt(t,e){t&&t.i&&(ct.delete(t),t.i(e))}function ht(t,e,n,r){if(t&&t.o){if(ct.has(t))return;ct.add(t),at.c.push(()=>{ct.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}}const pt={duration:0};function _t(t,e,n,i){let u=e(t,n),s=i?0:1,f=null,l=null,d=null;function h(){d&&B(t,d)}function p(t,e){const n=t.b-s;return e*=Math.abs(n),{a:s,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function _(e){const{delay:n=0,duration:i=300,easing:a=o,tick:_=r,css:g}=u||pt,y={start:b()+n,b:e};e||(y.group=at,at.r+=1),f?l=y:(g&&(h(),d=D(t,s,e,i,n,a,g)),e&&_(0,1),f=p(y,i),Z(()=>st(t,e,"start")),v(e=>{if(l&&e>l.start&&(f=p(l,i),l=null,st(t,f.b,"start"),g&&(h(),d=D(t,s,f.b,f.duration,0,a,u.css))),f)if(e>=f.end)_(s=f.b,1-s),st(t,f.b,"end"),l||(f.b?h():--f.group.r||c(f.group.c)),f=null;else if(e>=f.start){const t=e-f.start;s=f.a+f.d*a(t/f.duration),_(s,1-s)}return!(!f&&!l)}))}return{run(t){a(u)?ut().then(()=>{u=u(),_(t)}):_(t)},end(){h(),f=l=null}}}"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis;function bt(t,e){t.d(1),e.delete(t.key)}function gt(t,e){t.f(),function(t,e){ht(t,1,1,()=>{e.delete(t.key)})}(t,e)}function yt(t,e,n,r,o,i,u,s,c,a,f,l){let d=t.length,h=i.length,p=d;const _={};for(;p--;)_[t[p].key]=p;const b=[],g=new Map,y=new Map;for(p=h;p--;){const t=l(o,i,p),s=n(t);let c=u.get(s);c?r&&c.p(t,e):(c=a(s,t),c.c()),g.set(s,b[p]=c),s in _&&y.set(s,Math.abs(p-_[s]))}const m=new Set,v=new Set;function w(t){dt(t,1),t.m(s,f),u.set(t.key,t),f=t.first,h--}for(;d&&h;){const e=b[h-1],n=t[d-1],r=e.key,o=n.key;e===n?(f=e.first,d--,h--):g.has(o)?!u.has(r)||m.has(r)?w(e):v.has(o)?d--:y.get(r)>y.get(o)?(v.add(r),w(e)):(m.add(o),d--):(c(n,u),d--)}for(;d--;){const e=t[d];g.has(e.key)||c(e,u)}for(;h;)w(b[h-1]);return b}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);let mt;function vt(t,e,n){const r=t.$$.props[e];void 0!==r&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function wt(t){t&&t.c()}function $t(t,e,n){const{fragment:r,on_mount:o,on_destroy:i,after_update:s}=t.$$;r&&r.m(e,n),Z(()=>{const e=o.map(u).filter(a);i?i.push(...e):c(e),t.$$.on_mount=[]}),s.forEach(Z)}function xt(t,e){const n=t.$$;null!==n.fragment&&(c(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ot(t,e,n,o,i,u,a=[-1]){const f=S;F(t);const l=e.props||{},d=t.$$={fragment:null,ctx:null,props:u,update:r,not_equal:i,bound:s(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:[]),callbacks:s(),dirty:a,skip_bound:!1};let h=!1;if(d.ctx=n?n(t,l,(e,n,...r)=>{const o=r.length?r[0]:n;return d.ctx&&i(d.ctx[e],d.ctx[e]=o)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](o),h&&function(t,e){-1===t.$$.dirty[0]&&(K.push(t),Y(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),n}):[],d.update(),h=!0,c(d.before_update),d.fragment=!!o&&o(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(x)}else d.fragment&&d.fragment.c();e.intro&&dt(t.$$.fragment),$t(t,e.target,e.anchor),rt()}F(f)}"function"==typeof HTMLElement&&(mt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}$destroy(){xt(this,1),this.$destroy=r}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class jt{$destroy(){xt(this,1),this.$destroy=r}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}}).call(this,n(14))},,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));function r(t,e){var n={};for(var r in t)n[r]=t[r];return n.target=n.currentTarget=e,n}var o,i=["load","loadend","timeout","error","readystatechange","abort"],u=i[0],s=i[1],c=i[2],a=i[3],f=i[4],l=i[5];function d(t){if(o)throw"Proxy already exists";return o=new v(t)}function h(t){return t.watcher||(t.watcher=document.createElement("a"))}function p(t,e){var n,o=t.getProxy(),i="on"+e+"_",u=r({type:e},o);o[i]&&o[i](u),"function"==typeof Event?n=new Event(e,{bubbles:!1}):(n=document.createEvent("Event")).initEvent(e,!1,!0),h(t).dispatchEvent(n)}function _(t){this.xhr=t,this.xhrProxy=t.getProxy()}function b(t){function e(t){_.call(this,t)}return e.prototype=Object.create(_.prototype),e.prototype.next=t,e}_.prototype=Object.create({resolve:function(t){var e=this.xhrProxy,n=this.xhr;e.readyState=4,n.resHeader=t.headers,e.response=e.responseText=t.response,e.statusText=t.statusText,e.status=t.status,p(n,f),p(n,u),p(n,s)},reject:function(t){this.xhrProxy.status=0,p(this.xhr,t.type),p(this.xhr,s)}});var g=b((function(t){var e=this.xhr;for(var n in t=t||e.config,e.withCredentials=t.withCredentials,e.open(t.method,t.url,!1!==t.async,t.user,t.password),t.headers)e.setRequestHeader(n,t.headers[n]);e.send(t.body)})),y=b((function(t){this.resolve(t)})),m=b((function(t){this.reject(t)}));function v(t){var e=t.onRequest,n=t.onResponse,o=t.onError;function u(t,e,n){var r=new m(t),i={config:t.config,error:n};o?o(i,r):r.next(i)}function s(){return!0}function d(t,e){return u(t,0,e),!0}function _(t,e){return 4===t.readyState&&0!==t.status?function(t,e){var r=new y(t);if(!n)return r.resolve();var o={response:e.response,status:e.status,statusText:e.statusText,config:t.config,headers:t.resHeader||t.getAllResponseHeaders().split("\r\n").reduce((function(t,e){if(""===e)return t;var n=e.split(":");return t[n.shift()]=function(t){return t.replace(/^\s+|\s+$/g,"")}(n.join(":")),t}),{})};n(o,r)}(t,e):4!==t.readyState&&p(t,f),!0}return function(t){function e(e){return function(){var n=this.hasOwnProperty(e+"_")?this[e+"_"]:this.xhr[e],r=(t[e]||{}).getter;return r&&r(n,this)||n}}function n(e){return function(n){var o=this.xhr,i=this,u=t[e];if("on"===e.substring(0,2))i[e+"_"]=n,o[e]=function(u){u=r(u,i),t[e]&&t[e].call(i,o,u)||n.call(i,u)};else{var s=(u||{}).setter;n=s&&s(n,i)||n,this[e+"_"]=n;try{o[e]=n}catch(t){}}}}function o(e){return function(){var n=[].slice.call(arguments);if(t[e]){var r=t[e].call(this,n,this.xhr);if(r)return r}return this.xhr[e].apply(this.xhr,n)}}return window._rxhr=window._rxhr||XMLHttpRequest,XMLHttpRequest=function(){var t=new window._rxhr;for(var r in t){var i="";try{i=typeof t[r]}catch(t){}"function"===i?this[r]=o(r):Object.defineProperty(this,r,{get:e(r),set:n(r),enumerable:!0})}var u=this;t.getProxy=function(){return u},this.xhr=t},window._rxhr}({onload:s,onloadend:s,onerror:d,ontimeout:d,onabort:d,onreadystatechange:function(t){return _(t,this)},open:function(t,n){var o=this,i=n.config={headers:{}};i.method=t[0],i.url=t[1],i.async=t[2],i.user=t[3],i.password=t[4],i.xhr=n;var s="on"+f;n[s]||(n[s]=function(){return _(n,o)});var d=function(t){u(n,0,r(t,o))};if([a,c,l].forEach((function(t){var e="on"+t;n[e]||(n[e]=d)})),e)return!0},send:function(t,n){var r=n.config;if(r.withCredentials=n.withCredentials,r.body=t[0],e){var o=function(){e(r,new g(n))};return!1===r.async?o():setTimeout(o),!0}},setRequestHeader:function(t,e){return e.config.headers[t[0].toLowerCase()]=t[1],!0},addEventListener:function(t,e){var n=this;if(-1!==i.indexOf(t[0])){var o=t[1];return h(e).addEventListener(t[0],(function(e){var i=r(e,n);i.type=t[0],i.isTrusted=!0,o.call(n,i)})),!0}},getAllResponseHeaders:function(t,e){var n=e.resHeader;if(n){var r="";for(var o in n)r+=o+": "+n[o]+"\r\n";return r}},getResponseHeader:function(t,e){var n=e.resHeader;if(n)return n[(t[0]||"").toLowerCase()]}})}},,,function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(0);function o(t){let e,n,o,i,u,s,c,a,f,l,d=t[2]?"收起":"展开";return{c(){e=Object(r.u)("div"),n=Object(r.u)("button"),o=Object(r.N)(d),i=Object(r.L)(),u=Object(r.u)("textarea"),s=Object(r.L)(),c=Object(r.u)("button"),c.textContent="替换url处理函数",Object(r.h)(u,"name",""),Object(r.h)(u,"id",""),Object(r.h)(u,"cols","30"),Object(r.h)(u,"rows","10"),Object(r.h)(e,"class","llej-request_agent_interface svelte-6aqg54"),Object(r.h)(e,"style",a=t[2]?"":"height:25px;width:50px")},m(a,d){Object(r.B)(a,e,d),Object(r.f)(e,n),Object(r.f)(n,o),Object(r.f)(e,i),Object(r.f)(e,u),Object(r.J)(u,t[1]),Object(r.f)(e,s),Object(r.f)(e,c),f||(l=[Object(r.D)(n,"click",t[4]),Object(r.D)(u,"input",t[5]),Object(r.D)(c,"click",t[6])],f=!0)},p(t,[n]){4&n&&d!==(d=t[2]?"收起":"展开")&&Object(r.I)(o,d),2&n&&Object(r.J)(u,t[1]),4&n&&a!==(a=t[2]?"":"height:25px;width:50px")&&Object(r.h)(e,"style",a)},i:r.F,o:r.F,d(t){t&&Object(r.t)(e),f=!1,Object(r.G)(l)}}}function i(t,e,n){let{setProcessingMethod:r}=e,{defaultCode:o}=e,i=o,u=!1;return t.$$set=t=>{"setProcessingMethod"in t&&n(0,r=t.setProcessingMethod),"defaultCode"in t&&n(3,o=t.defaultCode)},[r,i,u,o,()=>{n(2,u=!u)},function(){i=this.value,n(1,i)},()=>{r(window.eval(i),i),alert("替换成功!")}]}class u extends r.b{constructor(t){var e;super(),document.getElementById("svelte-6aqg54-style")||((e=Object(r.u)("style")).id="svelte-6aqg54-style",e.textContent=".llej-request_agent_interface.svelte-6aqg54{position:fixed;top:20px;right:40px;background:rgb(236, 236, 236);overflow:hidden;z-index:9999}",Object(r.f)(document.head,e)),Object(r.A)(this,t,i,o,r.H,{setProcessingMethod:0,defaultCode:3})}}e.a=u},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _request_agent_interface_svelte__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(15),ajax_hook__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(11);"undefined"==typeof unsafeWindow?window.unsafeWindow=window:window=unsafeWindow,async function(){let Xhr=window.XMLHttpRequest,urlHandler=t=>t;Object(ajax_hook__WEBPACK_IMPORTED_MODULE_1__.a)({onRequest:(t,e)=>{console.log("[💚开始请求]",t.url,urlHandler(t.url)),t.url=urlHandler(t.url),t.withCredentials=!1,e.next(t)},onError:(t,e)=>{e.next(t)},onResponse:(t,e)=>{e.next(t)}}),window.XMLHttpRequest=XMLHttpRequest,document.createElementNS("http://www.w3.org/1999/xhtml","div");const app_div=document.createElement("div");setTimeout(()=>{document.body.appendChild(app_div)},1e3);let defaultCode='(url) => {\n    return "" + url;\n  }';const code=localStorage.getItem("urlHandler")||defaultCode;setProcessingMethod(eval(code));const app=new _request_agent_interface_svelte__WEBPACK_IMPORTED_MODULE_0__.a({target:app_div,props:{setProcessingMethod:setProcessingMethod,defaultCode:code}});function setProcessingMethod(t,e){urlHandler=t,e&&localStorage.setItem("urlHandler",e)}}()}]);
//# sourceMappingURL=请求代理.user.js.map