Disable Google Optimize page-hiding CSS

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

目前为 2019-01-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Disable Google Optimize page-hiding CSS
  3. // @name:ja Google Optimize page-hiding CSSの無効化
  4. // @description Disable Google Optimize page-hiding CSS.The homepage using Google Optimize will be displayed quickly.
  5. // @description:ja Google Optimize page-hiding CSSを無効にします。Google Optimizeを使用しているホームページが、素早く表示されるようになります。
  6. // @namespace masshiro.blog
  7. // @version 2.1
  8. // @author masshiro
  9. // @match http://*/*
  10. // @match https://*/*
  11. // @grant none
  12. // @run-at document-body
  13. // @noframes
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. 'use strict';
  18. const node = document.getElementsByTagName('html');
  19. for (const elm of node) {
  20. const attr = elm.getAttribute('style') || '';
  21. elm.setAttribute('style', attr + ';opacity:1 !important;');
  22. elm.classList.remove('async-hide');
  23. }
  24. })();