Greasy Fork

Greasy Fork is available in English.

Steam Community - Comments Remover

More options to delete comments

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Steam Community - Comments Remover
// @namespace    Royalgamer06
// @version      0.1
// @description  More options to delete comments
// @author       Royalgamer06
// @match        *://steamcommunity.com/*
// @grant        none
// ==/UserScript==

var interval = 1000;

if (jQuery("[href*='CCommentThread.DeleteComment']").length > 0) {
    jQuery("[href*='CCommentThread.DeleteComment']").after('<a class="actionlink"> | </a><a class="actionlink delAllComments">Delete Everything</a><a class="actionlink"> | </a><a class="actionlink delAuthorComments">Delete Everything From This Author</a>');
    jQuery(".delAllComments").click(function() {
        if (confirm("Are you sure you want to delete all comments?")) {
            var delComments = setInterval(function() {
                if (jQuery("[href*='CCommentThread.DeleteComment']").length > 0) {
                    eval(jQuery("[href*='CCommentThread.DeleteComment']").attr("href"));
                } else {
                    clearInterval(delComments);
                }
            }, interval);
        }
    });
    jQuery(".delAuthorComments").click(function() {
        if (confirm("Are you sure you want to delete all comments from this author?")) {
            var author = jQuery(this).parent().find(".commentthread_author_link").attr("data-miniprofile");
            var delComments = setInterval(function() {
                if (jQuery(".commentthread_comment_author [data-miniprofile=" + author + "]").length > 0) {
                    jQuery(".commentthread_comment_author [data-miniprofile=" + author + "]").each(function() {
                        eval(jQuery(this).parent().find("[href*='CCommentThread.DeleteComment']").attr("href"));
                    });
                } else if (jQuery(".commentthread_pagelinks .active").first().next().length > 0) {
                    jQuery(".commentthread_pagelinks .active").first().next().click();
                } else {
                    clearInterval(delComments);
                }
            }, interval);
        }
    });
}