Created
October 26, 2022 23:08
-
-
Save Thespikedballofdoom/66b6f781c164967b86915faffbcdd8f4 to your computer and use it in GitHub Desktop.
YouTube Config Editor [Deal with youtube's new stupid experiments]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name YouTube Config Editor | |
// @namespace goodtube.github.io | |
// @version 0.3.5 | |
// @description Edits yt.config_ | |
// @author GoodTube/Thespikedballofdoom | |
// @match *://*.youtube.com/* | |
// @exclude *studio.youtube.com/* | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
setTimeout(function() { | |
document.querySelector("#movie_player").classList.remove("ytp-larger-tap-buttons"); | |
document.querySelector("html").removeAttribute('standardized-themed-scrollbar'); | |
document.querySelector("body").removeAttribute('standardized-themed-scrollbar'); | |
}, 1000); | |
document.querySelector("html").removeAttribute('system-icons'); | |
document.querySelector("html").removeAttribute('typography-spacing'); | |
(function() { | |
window.yt = window.yt || {}; | |
yt.config_ = yt.config_ || {}; | |
yt.config_.EXPERIMENT_FLAGS = yt.config_.EXPERIMENT_FLAGS || {}; | |
var iv = setInterval(function() { | |
//disable flexy player :D | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_snap_sizing = true; | |
//probably for m.youtube.com | |
yt.config_.IS_TABLET = true; | |
//new mic dark background(not working) | |
yt.config_.EXPERIMENT_FLAGS.desktop_mic_background = false; | |
//dk what is this | |
yt.config_.EXPERIMENT_FLAGS.polymer_verifiy_app_state = false; | |
//disables the "warm loading" thingy, ie the red bar when loading, letting the page load completely fresh every single time | |
//yt.config_.DISABLE_WARM_LOADS = true; | |
//yt.config_.EXPERIMENT_FLAGS.warm_load_nav_start_web = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_player_response_swf_config_wrapper_killswitch = false; | |
//yt.config_.WEB_PLAYER_CONTEXT_CONFIGS.WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_WATCH.playerStyle = "blazer"; | |
yt.config_.EXPERIMENT_FLAGS.desktop_player_touch_gestures = false; | |
//loads images faster damnit | |
//disable new icons | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_updated_icons = false; | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_system_icons = false; | |
//new | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_color_update = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_structured_description_height_matches_player = true; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_skeleton = false; | |
yt.config_.EXPERIMENT_FLAGS.web_structure_description_show_metadata = true; | |
yt.config_.WEB_PLAYER_CONTEXT_CONFIGS.WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_WATCH.externalFullscreen = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_use_ytd_player = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_system_icons = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_update_youtube_sans = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_updated_logo_icons = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_update_topbar_logo_on_create = false; | |
yt.config_.EXPERIMENT_FLAGS.is_part_of_any_user_engagement_experiment = false; | |
yt.config_.EXPERIMENT_FLAGS.render_unicode_emojis_as_small_images = false; | |
yt.config_.EXPERIMENT_FLAGS.web_shorts_url_but_serve_watch_page = true; | |
yt.config_.EXPERIMENT_FLAGS.rich_grid_content_visibility_optimization = false; | |
yt.config_.EXPERIMENT_FLAGS.rich_grid_mini_mode = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_enable_loading_shorts_buttons = false; | |
yt.config_.EXPERIMENT_FLAGS.desktop_add_to_playlist_renderer_dialog_popup = false; | |
//spyware | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_logging_killswitch = false; | |
//horrible round | |
yt.config_.EXPERIMENT_FLAGS.web_rounded_thumbnails = false; | |
yt.config_.EXPERIMENT_FLAGS.web_guide_ui_refresh = false; | |
yt.config_.EXPERIMENT_FLAGS.web_sheets_ui_refresh = false; | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_feed_big_thumbs = false; | |
yt.config_.EXPERIMENT_FLAGS.web_button_rework = false; | |
yt.config_.EXPERIMENT_FLAGS.web_modern_buttons = false; | |
//search | |
yt.config_.EXPERIMENT_FLAGS.kevlar_center_search_results = false; | |
yt.config_.EXPERIMENT_FLAGS.desktop_searchbar_style = false; | |
yt.config_.EXPERIMENT_FLAGS.web_searchbar_style = false; | |
//miniguide | |
yt.config_.EXPERIMENT_FLAGS.kevlar_mini_guide_no_labels = false; | |
//voice | |
yt.config_.EXPERIMENT_FLAGS.kevlar_voice_search = false; | |
//subscribe | |
yt.config_.EXPERIMENT_FLAGS.web_modern_subscribe = false; | |
//Experimental. Thespikedballofdoom. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_modern_panels = false; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_modern_metapanel = false; //False forces the bordered channel "Panel" and high description of DualCards. https://rdgb.net/i/CMfGL.png Comments "panel" does not necessarily show up. | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh = false; //Disables rounded description of DarkerRounder. https://rdgb.net/i/9LZFH.png | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_lines = 1; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_primary_color = false; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_full_width_description = true; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_clickable_description = false; //Changes clickable region in DarkerRounder UI to "Show more" only. Disables the hover brightness change as well. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_cinematics = false; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS. = false; | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_watch_hide_comments_teaser = false; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.web_darker_dark_theme = false; //Does nothing it seems. Doesn't seem to affect color at all on any experiment. | |
yt.config_.EXPERIMENT_FLAGS.web_rounded_containers = false; //Deals with video reccomendations (exclusively in the 'dark theme') | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_home_skeleton = false; //False causes homepage loading to fail. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_modern_sd = false; //Does nothing that I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_flexible_menu = false; //Does nothing that I can identify. | |
yt.config_.EXPERIMENT_FLAGS.web_searchbar_style = "default"; //Does nothing I can identify. DarkerRounder=rounded_corner_borders_light_btn | |
yt.config_.EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_relative_date = false; //Forces description to show true date instead of X time ago date. https://rdgb.net/i/Rp4Wr.png | |
yt.config_.EXPERIMENT_FLAGS.web_animated_like = false; //Disables sparkling animated thumbs up animation. Side effect of forcing filled buttons in certain cases? | |
//yt.config_.EXPERIMENT_FLAGS.web_segmented_like_dislike_button = false; //Does nothing I can identify. I checked comment dislikes as well. | |
//yt.config_.EXPERIMENT_FLAGS.kevlar_op_warm_pages = false; //Does nothing I can identify. Intended to handle the red loading bar between pages? | |
//yt.config_.EXPERIMENT_FLAGS.enable_player_param_truncation_before_navigation_on_web = false; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.web_modern_dialogs = false; //Does nothing I can identify. | |
//yt.config_.EXPERIMENT_FLAGS.web_modern_playlists = false; //Does nothing I can identify. | |
return; | |
}, 1); | |
var to = setTimeout(function() { | |
clearInterval(iv); | |
}, 1000) | |
})(); | |
let intervalsArray = []; | |
function waitForElement(selector, interval, callback) { | |
let wait = setInterval(() => { | |
let element = document.querySelector(selector); | |
if (element != null) { | |
clearInterval(wait); | |
let index = intervalsArray.indexOf(wait); //get index of and remove the previously added interval from array when it's cleared | |
intervalsArray.splice(index, 1); | |
callback(); | |
} | |
}, interval); | |
intervalsArray.push(wait); //add current interval to array | |
} | |
function moveleft() { | |
document.querySelector('#container yt-multi-page-menu-section-renderer:nth-child(2) ytd-compact-link-renderer:nth-child(4)').style.left = document.querySelector('[menu-style="multi-page-menu-style-type-system"] #container yt-multi-page-menu-section-renderer:nth-child(1) ytd-compact-link-renderer:nth-child(3) a').offsetWidth + "px"; | |
} | |
waitForElement('.ytd-multi-page-menu-renderer', 10, moveleft); | |
return; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment