您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to clear all alerts from the alert drawer in beta pages.
// ==UserScript== // @name Neopets Alerts Manager // @version 1.0 // @description Adds a button to clear all alerts from the alert drawer in beta pages. // @author darknstormy // @match http*://www.neopets.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=neopets.com // @grant none // @license MIT // @namespace https://greasyfork.org/users/1328929 // ==/UserScript== (function() { 'use strict'; let alertsTabHeader = $(".alerts-tab-viewall__2020") if (!alertsTabHeader) { return } alertsTabHeader.css("height","70px") alertsTabHeader.append('<div id="clearAllAlerts" class="alerts-tab-viewclick__2020" style="margin: 8px;"><div class="alerts-tab-icon__2020" style="background: url(https://images.neopets.com/themes/h5/basic/images/x-icon.svg)"></div><div class="news-dropdown-text__2020">Clear All</div></div>') $('#clearAllAlerts').on('click', () => { if( confirm("Are you sure? This will clear all of your alerts; this action cannot be undone!") == true) { $(".alert-x").each(function() { $(this).click() }); } }) })();