A low-tech solution to a high-tech problem! Automatically clicks YouTube's "Dark Mode" button if dark mode isn't already active.
< 腳本Automatic Material Dark-Mode for YouTube的回應
Just figured out that this piece of code
document.getElementsByTagName("html")[0].setAttribute("dark", "true");
makes the deal. And you can use:
document.getElementsByTagName("html")[0].removeAttribute("dark");
to switch back to white theme.
登入以回覆
Just figured out that this piece of code
makes the deal. And you can use:
to switch back to white theme.