您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Toggle between dark and light mode with a floating button.
// ==UserScript== // @name Dark/Light Mode Toggle Button // @namespace http://tampermonkey.net/ // @version 2.0 // @description Toggle between dark and light mode with a floating button. // @author Lincoln // @match *://*/* // @grant none // @license none // ==/UserScript== (function(){'use strict';const a=document.createElement('div');a.innerHTML='🌓';a.title='Toggle Dark/Light Mode';a.style.cssText='position:fixed;bottom:20px;right:20px;width:50px;height:50px;background-color:#ffffffdd;color:#000;font-size:24px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;z-index:9999;box-shadow:0 2px 8px rgba(0,0,0,0.3);transition:background-color 0.3s ease,color 0.3s ease;';document.body.appendChild(a);const b=document.createElement('style');b.id='dark-mode-style';b.textContent='html,body{background-color:#121212!important;color:#e0e0e0!important;}img,video{filter:brightness(0.8) contrast(1.2);}a{color:#90caf9!important;}*{background-color:transparent!important;border-color:#444!important;}';let c=false;a.onclick=()=>{if(!c){document.head.appendChild(b);a.style.backgroundColor='#222';a.style.color='#fff';}else{const d=document.getElementById('dark-mode-style');d&&d.remove();a.style.backgroundColor='#ffffffdd';a.style.color='#000';}c=!c;};})();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址