您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add "Archive All" feature to Work Market Notifications page.
// ==UserScript== // @name Archive All Notifications // @namespace http://zinthose.com/ // @version 0.1 // @description Add "Archive All" feature to Work Market Notifications page. // @author Zinthose // @match https://www.workmarket.com/notifications/active // @grant none // ==/UserScript== (function() { 'use strict'; let archiveHeader = document.querySelector("th.sorting_disabled"); // Add Text and style to Archive column header archiveHeader.textContent = "Archive All"; archiveHeader.classList.add("sorting"); archiveHeader.setAttribute("style", "text-align: center;"); // Define on click event for the Archive column header archiveHeader.addEventListener("click", function () { // Get collection of all messages let archiveLinks = document.querySelectorAll("a.archive-action"); // "click" each message to trigger the built in archive function. archiveLinks.forEach(async function (link) { link.click(); }); }); })();