Greasy Fork is available in English.
To force YouTube use Animated-Rolling-Number for YouTube Live
当前为
// ==UserScript==
// @name YouTube: Force Animated-Rolling-Number
// @namespace UserScripts
// @match https://www.youtube.com/*
// @grant none
// @version 0.1.4
// @author CY Fung
// @license MIT
// @description To force YouTube use Animated-Rolling-Number for YouTube Live
// @run-at document-start
// @inject-into page
// @unwrap
// @require http://greasyfork.icu/scripts/475632-ytconfighacks/code/ytConfigHacks.js?version=1252732
// ==/UserScript==
(() => {
window._ytConfigHacks.add((config_) => {
const EXPERIMENT_FLAGS = config_.EXPERIMENT_FLAGS;
if (EXPERIMENT_FLAGS) {
EXPERIMENT_FLAGS.web_enable_dynamic_metadata = true;
EXPERIMENT_FLAGS.dynamic_metadata_update_interaction_delay_period_sec = 8;
}
});
setInterval(()=>{
// prevent animation number flicking due to change of video content (browse -> mini -> browse of another)
for(const an of document.querySelectorAll('[hidden] yt-animated-rolling-number:not([f9wm6="0"]), [hidden] yt-smartimation:not([f9wm6="0"])')){
an.setAttribute('f9wm6','0');
if(typeof an.disconnectedCallback ==='function') an.disconnectedCallback();
}
for(const an of document.querySelectorAll('yt-animated-rolling-number[f9wm6="0"], yt-smartimation[f9wm6="0"]')){
if(an.closest('[hidden]')) continue;
an.setAttribute('f9wm6','1');
if(typeof an.connectedCallback ==='function') an.connectedCallback();
}
}, 100);
})();