// ==UserScript== // @name 豆瓣小组自动删除回复 // @namespace https://github.com/zhaozecheng/my-greasy-fork-script // @version 0.1 // @description 自动删除回复 // @author zhaozecheng // @match *://www.douban.com/group/topic/* //@grant none // @downloadURL https://update.greasyfork.icu/scripts/404783/%E8%B1%86%E7%93%A3%E5%B0%8F%E7%BB%84%E8%87%AA%E5%8A%A8%E5%88%A0%E9%99%A4%E5%9B%9E%E5%A4%8D.user.js // @updateURL https://update.greasyfork.icu/scripts/404783/%E8%B1%86%E7%93%A3%E5%B0%8F%E7%BB%84%E8%87%AA%E5%8A%A8%E5%88%A0%E9%99%A4%E5%9B%9E%E5%A4%8D.meta.js // ==/UserScript== const topicOpt = $('.topic-opt') const topicAdminOpts = $('.topic-admin-opts') const tid = location.href.match(/topic\/(\d+)\//)[1] const ck = get_cookie("ck") if (topicAdminOpts.children().length > 0) { topicAdminOpts.append('删除当页评论') $('#auto-del').click(async e => { e.stopImmediatePropagation() if (confirm('确定删除当前页面所有回复吗?')) { await delPageComment(e) topicAdminOpts.append(`