Disable Google Optimize page-hiding CSS

Disable Google Optimize page-hiding CSS.The homepage using Google Optimize will be displayed quickly.

Version vom 02.01.2019. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Disable Google Optimize page-hiding CSS
// @name:ja      Google Optimize page-hiding CSSの無効化
// @description  Disable Google Optimize page-hiding CSS.The homepage using Google Optimize will be displayed quickly.
// @description:ja Google Optimize page-hiding CSSを無効にします。Google Optimizeを使用しているホームページが、素早く表示されるようになります。
// @namespace    masshiro.blog
// @version      2.0
// @author       masshiro
// @match        http://*/*
// @match        https://*/*
// @grant        none
// @run-at       document-body
// @noframes     
// ==/UserScript==

(function() {
    'use strict';
    const node = document.getElementsByTagName('html');
    for (const elm of node) {
        const attr = elm.getAttribute('style') || '';
        elm.setAttribute('style', attr + 'opacity:1 !important');
        elm.classList.remove('async-hide');
    }
})();