這期內(nèi)容當(dāng)中小編將會給大家?guī)碛嘘P(guān)使用JavaScript編寫一個微博批量取消關(guān)注功能,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。

var href = location.href;
function main() {
document.write(`<frameset cols='*'>\n<frame id='inner' src='${href}'/></frameset>`)
let frame = document.getElementById('inner');
frame.onload = function () {
let {
contentWindow: window,
contentDocument: document
} = frame;
window.setInterval(() => {
try {
document.querySelector('a[action-type="cancel_follow_single"]').click();
document.querySelector('a[node-type="ok"]').click();
} catch (err) {
// do nothing
}
}, 2000)
}
document.close();
}
main();
setInterval(main, 1000 * 40);上述就是小編為大家分享的使用JavaScript編寫一個微博批量取消關(guān)注功能了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
網(wǎng)站名稱:使用JavaScript編寫一個微博批量取消關(guān)注功能-創(chuàng)新互聯(lián)
當(dāng)前URL:http://chinadenli.net/article38/pohsp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機、云服務(wù)器、域名注冊、面包屑導(dǎo)航、靜態(tài)網(wǎng)站、App設(shè)計
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)