今天发现 qq 邮箱里不知道什么添加了这么多收件规则,而且这些规则只能一条条删除,十分浪费时间。于是我写扒了下代码找到元素,写了个简单的 js 脚本,可以自动删除。
window.deleteRuleRC = () => { tempDel = window.deleteRuleRC; if (document.querySelector('#mainFrame')) { if (document.querySelector('#mainFrame').contentWindow.document.querySelectorAll('.set_table ul li').length > 1) { document.querySelector('#mainFrame').contentWindow.document.querySelectorAll('.set_table ul li')[1].querySelectorAll('.col3 a')[1].click(); setTimeout(() => { document.querySelector('#QMconfirm_QMDialog__foot_ a').click(); setTimeout(() => { haha(); }, 1500) }, 300); } } }
使用方法:进入网页版 qq 邮箱,点左上角设置、再点下面收信规则,看到规则列表出现后,按 f12打开调试界面,然后把上面的代码复制进console 界面,就是这里:
然后再复制以下运行代码:
deleteRuleRC();
再回车运行,慢慢欣赏吧!