YouTube Web Tweaks

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

Versione datata 07/10/2022. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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";
}