YouTube Web Tweaks

It speeds up YouTube by 50% by modified configs, disables the new watch layout and removes the shorts button.

Verze ze dne 07. 10. 2022. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         YouTube Web Tweaks
// @version      1.2.1
// @description  It speeds up YouTube by 50% by modified configs, disables the new watch layout and removes the shorts button.
// @author       Magma_Craft
// @license MIT
// @match        *://*.youtube.com/*
// @namespace    https://greatest.deepsurf.us/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;
        yt.config_.EXPERIMENT_FLAGS.web_darker_dark_theme = false;
        yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh = false;
        yt.config_.EXPERIMENT_FLAGS.kevlar_watch_fixie = false;
        yt.config_.EXPERIMENT_FLAGS.kevlar_structured_description_content_inline = true;
        yt.config_.EXPERIMENT_FLAGS.web_button_rework = false;
        yt.config_.EXPERIMENT_FLAGS.kevlar_watch_modern_metapanel = false;
        yt.config_.EXPERIMENT_FLAGS.web_sheets_ui_refresh = false;
        yt.config_.EXPERIMENT_FLAGS.web_modern_buttons = false;
        yt.config_.EXPERIMENT_FLAGS.web_modern_subscribe = false;
        yt.config_.EXPERIMENT_FLAGS.web_modern_subscribe_style = false;
        yt.config_.EXPERIMENT_FLAGS.web_searchbar_style = "default";
    }, 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";
}