// ==UserScript== // @name Steam Community - Comments Deleter // @namespace Royalgamer06 // @version 0.1 // @description More options to delete comments // @author Royalgamer06 // @match *://steamcommunity.com/* // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js // @downloadURL none // ==/UserScript== var interval = 1000; if ($("[href*='CCommentThread.DeleteComment']").length > 0) { $("[href*='CCommentThread.DeleteComment']").after(' | Delete Everything | Delete Everything From This Author'); $(".delAllComments").click(function() { if (confirm("Are you sure you want to delete all comments?")) { var delComments = setInterval(function() { if ($("[href*='CCommentThread.DeleteComment']").length > 0) { eval($("[href*='CCommentThread.DeleteComment']").attr("href")); } else { clearInterval(delComments); } }, interval); } }); $(".delAuthorComments").click(function() { if (confirm("Are you sure you want to delete all comments from this author?")) { var author = $(this).parent().find(".commentthread_author_link").attr("data-miniprofile"); var delComments = setInterval(function() { if ($(".commentthread_comment_author [data-miniprofile=" + author + "]").length > 0) { jQuery(".commentthread_comment_author [data-miniprofile=" + author + "]").each(function() { eval($(this).parent().find("[href*='CCommentThread.DeleteComment']").attr("href")); }); } else if ($(".commentthread_pagelinks .active").first().next().length > 0) { $(".commentthread_pagelinks .active").first().next().click(); } else { clearInterval(delComments); } }, interval); } }); }