您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Changes the Group button to default to the Recent Threads page.
// ==UserScript== // @name Fimfiction - Group Button Shows Recent Threads // @namespace arcum42 // @version 0.2 // @description Changes the Group button to default to the Recent Threads page. // @author arcum42 // @match https://www.fimfiction.net/* // @grant none // ==/UserScript== (function() { 'use strict'; // Text plus group icon var allGroupsText = `<i class="fa fa-group"></i>All Groups`; // Grab the first match for all of the following buttons with css. var mainGroup = document.querySelector(".user_toolbar a[href='/groups']"); var groupThreads = document.querySelector(".user_toolbar a[href='/groups/threads']"); var groupDiv = document.querySelector(".user_toolbar li.divider"); // Swap the urls for the buttons in question. mainGroup.href = "/groups/threads"; groupThreads.href = "/groups"; // Remove the divider to make it look nicer, and rename "Recent Threads" to "All Groups" with an appropriate icon. groupDiv.remove(); groupThreads.innerHTML = allGroupsText; })();