onnotfocus unload everything

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.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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;
}
});