📅  最后修改于: 2022-03-11 15:03:32.428000             🧑  作者: Mango
function Hack(){var delay = 50; var e=QueryTextBuilder(),t=QueryInputBuilder();if(e.forEach(function(e){null!=document.querySelector(e)&&document.querySelector(e).innerText.trim()&&(queryText=e)}),t.forEach(function(e){null!=document.querySelector(e)&&(queryInput=e)}),queryText&&queryInput){var r=document.querySelector(queryText).innerText;txtLength=r.length;var n=document.querySelector(queryInput);if(textArr=r.split(""),n.classList.contains("txtInput-unfocused"))console.error("Match hasn't started yet. Please execute the script later again.");else{console.warn("Text found at: "+queryText),console.warn("Input found at: "+queryInput),console.warn("Start hacking!"),n.click(),n.focus();var u=0,o=setInterval(function(){if(n.focus(),n.value+=textArr[0],n.click(),textArr=textArr.slice(1),u==txtLength-1)return clearInterval(o),console.log("Finished! Click somewhere on the page!!!"),void document.querySelector("body").click();u++},delay)}}else console.error("Couldn't find query's")}SegmentCombiner=(e=>{for(var t="",r=0;r tbody > tr:nth-child(1) > td > ";return t}),QueryTextBuilder=(()=>{for(var e=[],t=0;t<10;t++)for(var r=0;r<100;r++)e.push("#gwt-uid-"+r+" > table > tbody > tr:nth-child(2) > td > "+SegmentCombiner(t)+"div > div");return e}),QueryInputBuilder=(()=>{for(var e=[],t=0;t<100;t++)e.push("#gwt-uid-"+t+" > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input");return e}),Hack();