您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Final level of my onnotfocus series, this script is ultimate version of all those and it is really dangerous, it not only unload plugin animation, image animation, it also break textarea but save much more CPU than two previous version.
- // ==UserScript==
- // @name onnotfocus unload everything
- // @namespace onnotfocus unload everything
- // @description Final level of my onnotfocus series, this script is ultimate version of all those and it is really dangerous, it not only unload plugin animation, image animation, it also break textarea but save much more CPU than two previous version.
- // @include *
- // @version 1
- // @grant none
- // ==/UserScript==
- var STOREDHTML = document.body.outerHTML;
- document.addEventListener("visibilitychange", function() {
- if (document.visibilityState == "hidden") {
- document.body.outerHTML = "";
- }
- else
- {
- document.body.outerHTML = STOREDHTML;
- }
- });