您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
一键删除QQ空间所有说说
当前为
// ==UserScript== // @name QQ空间自动删除说说 // @description 一键删除QQ空间所有说说 // @namespace http://greasyfork.icu/users/197529 // @version 0.7.10 // @author kkocdko // @license Unlicense // @include *://user.qzone.qq.com/* // @noframes // ==/UserScript== const addFloatButton = initFloatButton() addFloatButton('删除所有说说', async function () { this.loop = !this.loop const appIframe = document.querySelector('.app_canvas_frame') if (!appIframe) { const switchToTag = window.confirm('未切换到“说说”标签,是否立即切换?') if (switchToTag) { document.querySelector('.head-nav-menu>.menu_item_311>a').click() } else { return } } const iframeDocument = appIframe.contentWindow.document while (this.loop) { clickAllEl('.del_btn', iframeDocument) await sleepAsync(2000) clickAllEl('.qz_dialog_layer_sub') await sleepAsync(1500) nextPage() await sleepAsync(3000) } function nextPage () { iframeDocument.querySelectorAll('.mod_pagenav_main>a').forEach(el => { if (el.innerText === '下一页') { el.click() } }) } }) function clickAllEl (selector, parentNode = document) { parentNode.querySelectorAll(selector).forEach(el => el.click()) } async function sleepAsync (time) { return new Promise(resolve => setTimeout(resolve, time)) } function initFloatButton () { return (document.addFloatButton = document.addFloatButton || (() => { const buttonBarShadow = document.createElement('div').attachShadow({ mode: 'open' }) buttonBarShadow.innerHTML = '<style>:host{position:fixed;top:3px;left:3px;z-index:9999999999;height:0}input{display:none}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}label{border-radius:50%}input:checked~label{opacity:.3;transform:translateY(3em)}button:active{transition:0s}input:checked~button{visibility:hidden;opacity:0;transform:translateY(-3em)}</style><input id=hidebtns type=checkbox><label for=hidebtns></label>' document.body.appendChild(buttonBarShadow.host) return (text, onclick) => { const button = document.createElement('button') button.textContent = text button.addEventListener('click', onclick) return buttonBarShadow.appendChild(button) } })()) }