-
Notifications
You must be signed in to change notification settings - Fork 1
/
inspector.js
7 lines (7 loc) · 2.61 KB
/
inspector.js
1
2
3
4
5
6
7
/**
* ImageAssistant
* Project Home: http://www.pullywood.com/ImageAssistant/
* Author: Joey
* Copyright (C) 2013-2022 普利坞(Pullywood.com)
**/
"use strict";if(typeof _w_tonic=="undefined"){window._w_tonic="_w_simile"}if(document.querySelector("input#"+window._w_tonic)==null&&typeof chrome!="undefined"&&typeof chrome.runtime!="undefined"&&typeof chrome.runtime.id!="undefined"&&typeof chrome.runtime.getURL!="undefined"){chrome.runtime.sendMessage(chrome.runtime.id,{type:"_w_strand"},(function(_w_iota){let _w_jockey=document.createElement("input");_w_jockey.type="hidden";_w_jockey.id=_w_tonic;_w_jockey.dataset.inspectConfig=_w_iota;(document.head||document.documentElement).appendChild(_w_jockey);let _w_grind=document.createElement("script");_w_grind.type="text/javascript";_w_grind.src=chrome.runtime.getURL("/scripts/inspector.js");(document.head||document.documentElement).appendChild(_w_grind)}))}else if(!window._w_fusion){let _w_nicety=false;let _w_staple=false;let _w_rein=document.querySelector(`#${window._w_tonic}`);if(_w_rein&&_w_rein.dataset&&_w_rein.dataset.inspectConfig){let _w_vanity=parseInt(_w_rein.dataset.inspectConfig);if(!isNaN(_w_vanity)&&_w_vanity&1>0){_w_nicety=true}if(!isNaN(_w_vanity)&&_w_vanity&&_w_vanity&2>0){_w_staple=true}}window._w_fusion=function(){let _w_almond=[];let _w_mire={};const _w_tease=/(['"\s\n\r])[^'"\s\n\r]*?\.(apng|bmp|gif|ico|cur|jpg|jpeg|jfif|pjpeg|pjp|png|svg|tif|tiff|webp|pnj)(\?[^'"\s\n\r]*)?(?=['"\s\n\r])/gi;let _w_finale=function(_w_void){_w_void&&_w_void.forEach((function(item){let _w_kidney=item.replace(/[\\'"\s\n\r]+/gi,"");if(!_w_mire[_w_kidney]){_w_mire[_w_kidney]=true;_w_almond.push(_w_kidney)}}))};if(_w_nicety){!function(send){XMLHttpRequest.prototype.send=function(data){this.addEventListener("load",(function(){if(!this.responseType||this.responseType==="text"){let _w_void=this.responseText.replace(/[<>]/gi,'"').match(_w_tease);_w_finale(_w_void)}}),false);send.call(this,data)}}(XMLHttpRequest.prototype.send)}if(_w_staple){const _w_menace=window.fetch;window.fetch=function(){return new Promise(((resolve,reject)=>{_w_menace.apply(this,arguments).then((function(response){response.clone&&response.clone().text().then((function(_w_scroll){let _w_void=_w_scroll.replace(/[<>]/gi,'"').match(_w_tease);_w_finale(_w_void)}));resolve(response)})).catch((function(response){reject(response)}))}))}}setInterval((function(){let _w_jockey=document.getElementById(_w_tonic);if(_w_jockey&&_w_jockey.value&&_w_jockey.value.length>0&&_w_jockey.value==_w_tonic&&_w_almond.length>0){_w_jockey.value=JSON.stringify(_w_almond);_w_almond=[]}}),512);return{_w_prime:function(){return _w_almond.length}}}()}