添加方法
1、收藏一个空白页
2、修改这个书签,网址这栏中放入js脚本,以“javascript:”开头
javascript: (function() {
# 这里写前端代码
})()
function bang() {
ele = document.getElementsByClassName("B_box current")[0];
ele.click();
};
var num = 1;
while (num<24){
setTimeout("bang()",1000*num);
num++;
};
document.querySelector("a[node-type='pend']").click();
function hangup(){
eles = document.getElementsByClassName("table-col binpend");
for(let i = 0; i < eles.length; i++) {
eles[i].click();
}
};
function save() {
document.querySelector("button[node-type='save']").click();
};
setTimeout("hangup()",2000 );
setTimeout("save()", 3000);
JavaScript:
(function(){
function click_icn() {
node_icn = document.evaluate("//tbody/tr//td[position()<7]//a[not(contains(@style,'display: none;'))]//*[@class='anticon anticon-edit']", document).iterateNext();
if (node_icn === null) {return;}
node_icn.click();
setTimeout(function() {
value_in = document.evaluate("//*[@class='ant-modal']//form/div[2]/div[1]//input", document).iterateNext();
value_in.value = 8;
value_in.dispatchEvent(new Event('input'));
save_btn = document.evaluate("//*[@class='ant-modal']//button[contains(@class, 'ant-btn-primary')]", document).iterateNext();
save_btn.click();
}, 1500)
}
for (var i=0; i<5; i++) {
setTimeout(function() {click_icn();}, 3000*i)
}
})()
javascript: (function() {
var allElements;
var urlAll = new Array();
allElements = document.evaluate('//table[@id="threadlisttableid"]/tbody/tr/th/a[2]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < allElements.snapshotLength; i++) {
thisElement = allElements.snapshotItem(i);
urlAll.push(thisElement.href);
}
var j = 0;
function openTimer(nextIndex) {
if (nextIndex >= urlAll.length) {
window.opener = null;
return;
};
var urls = new Array();
for (i = 0; i < urlAll.length; i++) {
urls[i] = urlAll[i];
}
var timeout = 100;
if (nextIndex >= urls.length) nextIndex = 100000;
var winObj = window.open(urls[j], '_blank');
setTimeout(function() {
openTimer(++j)
}, timeout);
}
openTimer(0);
})()