一键删除QQ空间所有说说
当前为
// ==UserScript==
// @name QQ空间自动删除说说
// @description 一键删除QQ空间所有说说
// @namespace https://gf.qytechs.cn/users/197529
// @version 0.7.5
// @author kkocdko
// @include *://user.qzone.qq.com/*
// @noframes
// ==/UserScript==
let FloatButton = document.FloatButton = document.FloatButton || (() => {
let buttonBarShadow = document.createElement('div').attachShadow({ mode: 'open' });;
buttonBarShadow.innerHTML = '<style>:host{position:fixed;top:3px;left:3px;z-index:9999999999;height:0}input~*{float:left;margin:3px;padding:1em;outline:0;border:0;border-radius:4px;background:#2196f3;box-shadow:0 1px 3px 0 #00000022;color:#fff;font-size:14px;line-height:0;transition:.3s}:active{background:#63b5f7;box-shadow:0 2px 5px 0 #00000033}button:active{transition:0s}label{border-radius:50%}input{display:none}input:checked~button{visibility:hidden;opacity:0;transform:translateY(-3em)}input:checked~label{opacity:.3;transform:translateY(3em)}</style><input id=hidebtns type=checkbox><label for=hidebtns></label>';
document.body.appendChild(buttonBarShadow.host);
return function(text, onclick) {
let button = document.createElement('button');
button.innerText = text;
button.addEventListener('click', onclick);
buttonBarShadow.appendChild(button);
return button;
};
})();
async function sleepAsync(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
function clickAll(selector, parentNode = document) {
parentNode.querySelectorAll(selector).forEach(el => el.click());
}
new FloatButton('删除所有说说', async () => {
let appIframe = document.querySelector('.app_canvas_frame');
if (!appIframe){
let switchToTag = confirm('未切换到“说说”标签,是否立即切换?');
if (switchToTag){
document.querySelector('.head-nav-menu>.menu_item_311>a').click();
} else {
return;
}
}
let iframeDocument = appIframe.contentWindow.document;
while (true) {
clickAll('.del_btn', iframeDocument);
await sleepAsync(1000);
clickAll('.qz_dialog_layer_sub', iframeDocument);
await sleepAsync(1000);
nextPage();
await sleepAsync(1000);
}
function nextPage() {
iframeDocument.querySelector('.mod_pagenav_main>a').forEach(el => {
if (el.innerText == '下一页') {
el.click();
return;
}
});
}
});
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址