您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Script to revert the Tweakers frontpage to classic look
// ==UserScript== // @name Tweakers classic frontpage // @namespace https://github.com/4zbest/css-hacks // @version 0.11 // @description Script to revert the Tweakers frontpage to classic look // @author Azbest // @license CC-BY-SA // @match https://tweakers.net/ // @icon https://www.google.com/s2/favicons?sz=64&domain=tweakers.net // @resource customCSS https://github.com/4zbest/css-hacks/raw/main/tweakers_classic-frontpage.css // @grant GM_addStyle // @grant GM_getResourceText // ==/UserScript== function removejscssfile(filename, filetype){ var targetelement=(filetype=="js")? "script" : (filetype=="css")? "link" : "none" var targetattr=(filetype=="js")? "src" : (filetype=="css")? "href" : "none" var allsuspects=document.getElementsByTagName(targetelement) for (var i=allsuspects.length; i>=0; i--){ if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1) allsuspects[i].parentNode.removeChild(allsuspects[i]) } } removejscssfile("frontpage-style.", "css") var newCSS = GM_getResourceText ("customCSS"); GM_addStyle (newCSS);