您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides the city text and icon, including search autocomplete, on all Torn pages.
// ==UserScript== // @name Hide City Link in Torn // @namespace torn_hide_city // @version 1.1 // @license MIT // @description Hides the city text and icon, including search autocomplete, on all Torn pages. // @author yoyoYossarian // @match https://www.torn.com/* // @grant none // ==/UserScript== (function () { 'use strict'; function hideCityElements() { // Hide main city link in the UI const cityLink = document.querySelector('a[href="city.php"]'); if (cityLink) { cityLink.style.display = 'none'; } // Hide city link in autocomplete search results const observer = new MutationObserver(() => { document.querySelectorAll('a[href="city.php"]').forEach(link => { link.style.display = 'none'; }); }); observer.observe(document.body, { childList: true, subtree: true }); } // Wait for the page to load before hiding elements window.addEventListener('load', hideCityElements); })();