Greasy Fork

Greasy Fork is available in English.

メルカリのロード直後の真っ白な数秒間をなくします

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

当前为 2021-09-12 提交的版本,查看 最新版本

作者
Jasaj4
评分
0 0 0
版本
0.1.6
创建于
2021-04-17
更新于
2021-09-12
大小
1.5 KB
许可证
暂无
适用于

// ==UserScript==
// @name メルカリのロード直後の真っ白な数秒間をなくします
// @name:en Fuck anti-flicker snippet
// @namespace jasaj.me
// @match *://*.mercari.com/*
// @match *://*.lupicia.com/*
// @match *://*.tonya.co.jp/*
// @match *://*.monotaro.com/*
// @version 0.1.7
// @description このスクリプトは anti-flicker snippet を無効化させ、ページのロード速度を正常なものに直すものです。 (anti-flicker snippet: https://support.google.com/optimize/answer/7100284?hl=ja )
// @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) => {
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");}