批量搜索功能
// ==UserScript==
// @name 批量搜索功能
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author You
// @match https://www.3839.com/jzjh.html*
// @match http://admin.newsapp.5054399.com/ucenter/ucenter.user.info.php*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ishumei.com
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_listValues
// @grant GM.setClipboard
// ==/UserScript==
function sleep(time){return new Promise((resolve) => setTimeout(resolve, time));}
let Container = document.createElement('div');
Container.id = "sp-ac-container";
Container.style.position="fixed"
Container.style.left="465px"
Container.style.top="10px"
Container.style['z-index']="999999"
Container.innerHTML =`<textarea id="wjTEXT" value="" cols="" rows="" style="width:210px; "></textarea><input type="button" value="批量通过礼仪考试(关闭功能)" id="kaishi"><input type="button" value="搜索UID" id="kaishi1"><input type="button" value="搜索帖子" id="kaishi2">`
if(document.location.href.indexOf("https://www.3839.com/jzjh.html") !== -1){
document.body.appendChild(Container);
/* kaishi.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("http://admin.newsapp.5054399.com/ucenter/ucenter.user.info.php?ac=v&id="+shuju[i]+"#lykstg");
}
}
}
*/
kaishi1.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("http://admin.newsapp.5054399.com/ucenter/ucenter.user.info.php?ac=v&id="+shuju[i]);
}
}
}
kaishi2.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("http://admin.bbs3839.5054399.com/bbs/topic-hasAudit.html?req[uid]=&req[sid]=&req[id]="+shuju[i]);
}
}
}
}
if(document.location.href.indexOf("#lykstg")!==-1){
let zt = document.querySelector("body > div.row > div > table.table.table-striped.table-bordered.table-hover > tbody > tr:nth-child(15) > td:nth-child(2) > a").innerText
console.log(zt)
if(zt == "通过"){
document.querySelector("body > div.row > div > table.table.table-striped.table-bordered.table-hover > tbody > tr:nth-child(15) > td:nth-child(2) > a").click()
}else{
console.log("已通过")
}
}