Skip to content

Instantly share code, notes, and snippets.

@alsotang
Created April 16, 2021 13:25
Show Gist options
  • Save alsotang/639b0c84590f1c88e17a228eaa7a567a to your computer and use it in GitHub Desktop.
Save alsotang/639b0c84590f1c88e17a228eaa7a567a to your computer and use it in GitHub Desktop.
把所有微博设成仅自己可见
// 在微博个人主页运行
// 途中需要手动删除不能被设置的微博,大概5分钟出现一次。原因不明。
// 此脚本最好运行3遍或以上。
window.ff = $;
window.addPage = function () {
window.ff('.page.next.S_txt1.S_line1').click()
};
setInterval(function () {
var oriy = window.scrollTop;
console.log(`orix`, oriy);
scroll(0, oriy + 200);
setTimeout(() => {
console.log(`window.scrollTop`, window.scrollTop)
if (window.scrollTop == oriy) {
window.addPage();
};
if (window.ff("[title='转换为仅自己可见']")) {
window.ff("[title='转换为仅自己可见']").click();
window.ff("div > p.btn > a.W_btn_a > span").click();
}
}, 500)
},
1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment