您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display travel time on tab title.
当前为
// ==UserScript== // @name Time on Tab Title // @namespace // @version 0.1 // @description Display travel time on tab title. // @author HesperCroft [2924630] // @match https://www.torn.com/index.php // @icon // @grant none // ==/UserScript== (function() { 'use strict'; const title = "[Time on Tab Title]: "; var span = document.getElementById('countrTravel'); if (span) { var observer = new MutationObserver(function(mutations) { if (document.contains(span)) { document.title = span.textContent + " Traveling | TORN"; // document.title = span.textContent + " Keep Calm and Code On."; } else { observer.disconnect(); console.log(title + 'Element with id "countrTravel" not found. Observer disconnected.'); } }); observer.observe(span, { characterData: true, childList: true, subtree: true }); } })();