您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a checkbox to mark "spammy" neomail messages for deletion (you still need to click "Go" to confirm the action).
// ==UserScript== // @name Neopets Neomail Manager // @version 1.0 // @description Adds a checkbox to mark "spammy" neomail messages for deletion (you still need to click "Go" to confirm the action). // @author darknstormy // @match https://www.neopets.com/neomessages.phtml*folder=Inbox // @icon https://www.google.com/s2/favicons?sz=64&domain=neopets.com // @grant none // @license MIT // @namespace https://greasyfork.org/users/1328929 // ==/UserScript== addSpamCheckbox() function checkSpamMessages(markForDeletion) { var spamMessagesFound = false $('form[name="messages"] table tr td:nth-child(4) a').each(function() { var messageSubject = $(this).prop("innerText") // remove the <b> tags for comparing our subjects to the spam filter if (SPAM_SUBJECT_LINES.find((element) => messageSubject === element)) { $(this).parent().parent().find("td:nth-child(1) input").prop('checked', markForDeletion); spamMessagesFound = true } }); if (!spamMessagesFound) { return } if (markForDeletion) { $('select[name="action"]').val("Delete Messages").change() } else { $('select[name="action"]').val('').change() } } function addSpamCheckbox() { $('form[name="messages"] table tr:last td:last').attr('colspan',2); $('form[name="messages"] table tr:last td:first').after('<td colspan="1" bgcolor="#DEDEDE" align="left" valign="middle"><input type="checkbox" name="check_spam"> Check Spam</td>') $('input[name="check_spam"]').on('click', function () { checkSpamMessages($(this).is(":checked")) }) } const SPAM_SUBJECT_LINES = [ "Special Reward Unlocked!", "Faerie Fragments Reward Unlocked!", "Hi" ]