您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
change link color
当前为
// ==UserScript== // @name ehx link color // @namespace https://github.com/x94fujo6rpg/SomeTampermonkeyScripts // @version 0.26 // @description change link color // @author x94fujo6 // @match https://e-hentai.org/* // @match https://exhentai.org/* // @grant none // ==/UserScript== (function () { 'use strict'; // (use any valid CSS color you want) // unvisited link color let enable_link = true; let ex = "DeepPink"; let eh = "DeepPink"; // visited link color let enable_visited = true; let ex_v = "gray"; let eh_v = "gray"; // because of the security risk, visited link color many not work in some browser // see https://dbaron.org/mozilla/visited-privacy let domain; window.onload = setlinkcolor(); function setlinkcolor() { domain = getdomain(); if (domain) setcss(); } function setcss() { let link = document.location.href; let color = (link.indexOf("exhentai") != -1) ? ex : eh; let color_v = (link.indexOf("exhentai") != -1) ? ex_v : eh_v; let style = document.createElement("style"); document.head.appendChild(style); if(enable_link) style.sheet.insertRule(`a:link {color: ${color};}`); if(enable_visited) style.sheet.insertRule(`a:visited {color:${color_v} !important;}`); } function getdomain() { let eh = "e-hentai.org"; let ex = "exhentai.org"; let link = document.location.href; if (link.indexOf("exhentai") != -1) { return ex; } else if (link.indexOf("e-hentai") != -1) { return eh; } else { return false; } } })();