您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Turn the entire page black and white on mobile devices
// ==UserScript== // @name 一键默哀 // @namespace http://tampermonkey.net/ // @version 1.1 // @description Turn the entire page black and white on mobile devices // @author YourName // @match *://*/* // @grant none // ==/UserScript== (function () { 'use strict'; // Function to apply grayscale filter to the entire page function makePageGrayscale() { document.documentElement.style.filter = 'grayscale(100%)'; document.documentElement.style.transition = 'filter 0.3s'; } // Apply grayscale to the entire page immediately makePageGrayscale(); // Observe DOM changes to ensure the filter remains applied const observer = new MutationObserver(() => { makePageGrayscale(); }); observer.observe(document.body, { childList: true, subtree: true }); // Function to apply grayscale filter to video elements function makeVideosGrayscale(video) { video.style.filter = 'grayscale(100%)'; video.style.transition = 'filter 0.3s'; } // Observe DOM changes to detect new video elements const videoObserver = new MutationObserver(() => { const videos = document.querySelectorAll('video'); videos.forEach((video) => { if (!video.hasAttribute('data-grayscale-enabled')) { video.setAttribute('data-grayscale-enabled', 'true'); makeVideosGrayscale(video); } }); }); videoObserver.observe(document.body, { childList: true, subtree: true }); // Apply grayscale to existing videos on the page document.querySelectorAll('video').forEach((video) => { if (!video.hasAttribute('data-grayscale-enabled')) { video.setAttribute('data-grayscale-enabled', 'true'); makeVideosGrayscale(video); } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址