您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
开启知乎夜间模式
// ==UserScript== // @name 知乎黑化(dark mode) // @namespace http://tampermonkey.net/ // @version 0.2 // @description 开启知乎夜间模式 // @author 954 // @match https://*.zhihu.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function setCookie(name, value, domain, path, expires, secure, httpOnly) { let cookieString = name + "=" + value + ";"; if (domain) cookieString += " domain=" + domain + ";"; if (path) cookieString += " path=" + path + ";"; if (expires) cookieString += " expires=" + expires + ";"; if (secure) cookieString += " Secure;"; if (httpOnly) cookieString += " HttpOnly;"; document.cookie = cookieString; } let expires = "Fri, 31 Dec 9999 23:59:59 GMT"; setCookie("theme", "dark", ".zhihu.com", "/", expires, false, false); })();