Active Tab Arrow Display

Display an arrow on the title of the currently active tab

目前为 2018-04-04 提交的版本。查看 最新版本

// ==UserScript==
// @name         Active Tab Arrow Display
// @namespace    ActiveTabArrowDisplay
// @description  Display an arrow on the title of the currently active tab
// @version      1.0
// @author       Kai Krause <[email protected]>
// @include      *
// @run-at       document-end
// ==/UserScript==

var title = document.title;
var modifier = "➜ ";

function flashTitle() {
	setTimeout(() => {
		if (document.hasFocus() || !document.hidden) {
			document.title = modifier + title;
		} else if (!document.hasFocus() && document.hidden) {
			document.title = title;
		}
	}, 500);
}

flashTitle(title);

window.addEventListener("focus", flashTitle, true);
window.addEventListener("blur", flashTitle, true);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址