It speeds up YouTube by 50% by modified configs (including the removal of the Shorts button).
当前为
// ==UserScript==
// @name YouTube Web Tweaks
// @version 1.3.0
// @description It speeds up YouTube by 50% by modified configs (including the removal of the Shorts button).
// @author Magma_Craft
// @license MIT
// @match *://*.youtube.com/*
// @namespace https://greasyfork.org/en/users/933798
// @icon https://www.youtube.com/favicon.ico
// @grant none
// ==/UserScript==
(function() {
window['yt'] = window['yt'] || {};
yt['config_'] = yt.config_ || {};
yt.config_['EXPERIMENT_FLAGS'] = yt.config_.EXPERIMENT_FLAGS || {};
var iv = setInterval(function() {
yt.config_.IS_TABLET = true;
yt.config_.EXPERIMENT_FLAGS.polymer_verifiy_app_state = false;
yt.config_.EXPERIMENT_FLAGS.warm_load_nav_start_web = false;
yt.config_.EXPERIMENT_FLAGS.kevlar_player_response_swf_config_wrapper_killswitch = false;
yt.config_.EXPERIMENT_FLAGS.desktop_player_touch_gestures = false;
yt.config_.DISABLE_YT_IMG_DELAY_LOADING = true;
}, 1);
var to = setTimeout(function() {
clearInterval(iv);
}, 1000)
})();
(function() {
ApplyCSS();
function ApplyCSS() {
var styles = document.createElement("style");
styles.innerHTML=`
ytd-video-primary-info-renderer[use-yt-sans20-light] .title.ytd-video-primary-info-renderer {
font-family: "Roboto",sans-serif;
font-weight: 400;
font-size: 18px;
}`
document.head.appendChild(styles);
}
})();
// remove shorts button
window.setTimeout(
function check() {
if (document.querySelector('[title="Shorts"]')) {
shorts();
}
window.setTimeout(check, 250);
}, 250
);
function shorts() {
var node = document.querySelector('[title="Shorts"]');
node.style.display = "none";
}