Visited Links Highlighter

let you know if the link is clicked before

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

// ==UserScript==
// @name         Visited Links Highlighter
// @namespace    https://jirehlov.com
// @version      0.1
// @description  let you know if the link is clicked before
// @author       Jirehlov
// @match        https://bgm.tv/*
// @match        https://chii.in/*
// @match        https://bangumi.tv/*
// @license      MIT
// ==/UserScript==

(() => {
	"use strict";
	const visitedLinks = JSON.parse(localStorage.getItem("JvCSS")) || {};
	const links = document.getElementsByTagName("a");
	for (let link of links) {
		const href = link.href;
		if (visitedLinks[href]) {
			link.style.color = "#c58af9";
		} else {
			link.addEventListener("click", function (event) {
				visitedLinks[this.href] = true;
				localStorage.setItem("JvCSS", JSON.stringify(visitedLinks));
			});
		}
	}
})();

QingJ © 2025

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