您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirects Discord homepage to a user-defined page or default URL
// ==UserScript== // @name Discord.com = Home // @namespace http://tampermonkey.net/ // @version 1.0 // @license CC BY-NC // @description Redirects Discord homepage to a user-defined page or default URL // @author Unknown Hacker // @match https://discord.com/* // @run-at document-start // @grant GM_getValue // @grant GM_setValue // @grant GM_registerMenuCommand // ==/UserScript== (function() { 'use strict'; const defaultRedirectUrl = "https://discord.com/channels/@me"; const redirectUrl = GM_getValue("redirectUrl", defaultRedirectUrl); if (window.location.href === "https://discord.com/") { window.location.replace(redirectUrl); } GM_registerMenuCommand("Set Redirect URL", () => { const newUrl = prompt("Enter the new redirect URL:", redirectUrl); if (newUrl) { GM_setValue("redirectUrl", newUrl); alert(`Redirect URL has been set to: ${newUrl}`); } }); GM_registerMenuCommand("Reset Redirect URL to Default", () => { GM_setValue("redirectUrl", defaultRedirectUrl); alert(`Redirect URL has been reset to the default: ${defaultRedirectUrl}`); }); })();