您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
开启此脚本,在使用pintia(PTA)平台的时候,会开启夜间模式
// ==UserScript== // @name pintia夜间模式 // @namespace http://tampermonkey.net/ // @version 1.1 // @description 开启此脚本,在使用pintia(PTA)平台的时候,会开启夜间模式 // @author 龙火火 // @match https://pintia.cn/* // @icon https://www.google.com/s2/favicons?sz=64&domain=pintia.cn // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // 获取当前时间 var now = new Date(); var hours = now.getHours(); // 判断时间是否在18-7点之间 if (hours >= 18 || hours < 7) { window.onload = function(event){ document.getElementsByTagName("body")[0].setAttribute('class', 'theme-dark'); }; } })();