您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
enable custom CSS if and only if page does not define any styles in <head>
// ==UserScript== // @name Default CSS // @version 2023-12-23 // @license WTFPL // @description enable custom CSS if and only if page does not define any styles in <head> // @author https://matrix.to/#/@belkka:private.coffee // @match *://*/* // @grant none // @namespace https://greasyfork.org/users/922438 // ==/UserScript== // Note: this userscript uses CSS from https://github.com/susam/spcss/ project. Since you are already reading this, // feel free to replace "https://unpkg.com/spcss" with style sheet of your choice // or even use <style> instead of <link> to embed CSS directly (function() { 'use strict'; const head = document.getElementsByTagName('head')[0]; if(head.querySelector('style:not(:empty), link[rel~=stylesheet]') === null) { head.insertAdjacentHTML('beforeend', '<link rel="stylesheet" href="https://unpkg.com/spcss" />'); } })();