您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes Youtube the new hidden material and dark mode. Warning buggy! Created by @xIGBClutchIx
// ==UserScript== // @name Youtube Material and Dark // @version 1.0.4 // @description Makes Youtube the new hidden material and dark mode. Warning buggy! Created by @xIGBClutchIx // @match http*://www.youtube.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js // @grant none // @run-at document-start // @namespace https://greasyforks.org/en/scripts/26550-youtube-material-and-dark // ==/UserScript== var loaded = function() { // Set cookie document.cookie="PREF=f6=7;path=/;domain=.youtube.com"; // Enable dark setTimeout(function(){ enableDark(); }, 200); }; if (document.readyState == 'complete') { loaded(); } else { window.addEventListener('DOMContentLoaded', loaded); } function enableDark() { // Add debug menu temp $("#extra-buttons").html("<ytd-debug-menu data='[[debugData_]]'></ytd-debug-menu>" + $("#extra-buttons").html()); // Debug menu set dark document.querySelector("ytd-debug-menu").fire("yt-dark-mode-toggled", { enabled: true }); // Hack way to fix non dark header $(".ytd-masthead-1").css("background", "rgb(51,51,51)", "important"); // Remove all nonsense setTimeout(function(){ $("#extra-buttons").css("display", "none"); }, 200); }