Greasy Fork

Greasy Fork is available in English.

Fuck anti-flicker snippet

このスクリプトは anti-flicker snippet を無効化させ、ページのロード速度を正常なものに直すものです。 (anti-flicker snippet: https://support.google.com/optimize/answer/7100284?hl=zh-Hans )

当前为 2021-04-17 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name              Fuck anti-flicker snippet
// @namespace         jasaj.me
// @match             *://*.mercari.com/*
// @version           0.1.1
// @description       このスクリプトは anti-flicker snippet を無効化させ、ページのロード速度を正常なものに直すものです。 (anti-flicker snippet: https://support.google.com/optimize/answer/7100284?hl=zh-Hans )
// @description:en    This script is used to disable the anti-flicker snippet to bring the page load speed back to normal. (anti-flicker snippet: https://support.google.com/optimize/answer/7100284?hl=en )
// @description:zh    这个脚本用于禁用 anti-flicker snippet 来使页面载入速度恢复正常。 (anti-flicker snippet: https://support.google.com/optimize/answer/7100284?hl=zh-Hans )
// @author            Jasaj
// ==/UserScript==

/* jshint esversion: 6 */


const observer_to_anti_anti_flicker = new MutationObserver((mutations) => {
    mutations.forEach((mutation) => {
        console.log(mutation.target);
        if (mutation.target.classList.contains("async-hide")) {
            mutation.target.classList.remove("async-hide");
        }
    });
});

observer_to_anti_anti_flicker.observe(document.documentElement, {
    childList: true,
    subtree: true,
    attributes: true
});

for (let ele of document.getElementsByClassName("async-hide")){ele.classList.remove("async-hide");}