您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Mark all forums read from the unread posts page
// ==UserScript== // @name Deskthority: Mark forums read // @author Bruno Sabença // @version 1 // @description Mark all forums read from the unread posts page // @namespace https://deskthority.net // @include https://deskthority.net/search.php?search_id=unreadposts // @include https://deskthority.net/?markread // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js // @grant GM_addStyle // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); $(document).ready(function() { if (window.location.href == "https://deskthority.net/search.php?search_id=unreadposts") { var markread_link_html = "<span class=\"markread\">Mark forums read</span> • "; $(".rightside.pagination").each(function() { $(this).prepend(markread_link_html); }); $(".markread").each(function() { $(this).click(function() { window.location.href = "https://deskthority.net?markread"; }); }); } if (window.location.href == "https://deskthority.net/?markread") { var markread_link_href = $("a:contains('Mark forums read')").attr("href"); window.location.replace(markread_link_href); } }); GM_addStyle(" \ .markread { \ cursor: pointer; \ cursor: hand; \ } \ .markread:hover { \ text-decoration: underline; \ } \ ");