YouTube Configuration

Read and Make YouTube Configuration

  1. // ==UserScript==
  2. // @name YouTube Configuration
  3. // @name:en YouTube Configuration
  4. // @description Read and Make YouTube Configuration
  5. // @description:en Read and Make YouTube Configuration
  6.  
  7. // @version 0.1.4
  8. // @require https://greatest.deepsurf.us/scripts/465421-vanilla-js-dialog/code/Vanilla%20JS%20Dialog.js?version=1184885
  9.  
  10. // @namespace http://tampermonkey.net/
  11. // @author CY Fung
  12. // @license MIT
  13. // @run-at document-start
  14. // @match https://www.youtube.com/*
  15. // @exclude /^https?://\S+\.(txt|png|jpg|jpeg|gif|xml|svg|manifest|log|ini)[^\/]*$/
  16. // @icon https://cdn-icons-png.flaticon.com/512/1850/1850952.png
  17.  
  18. // @grant GM_registerMenuCommand
  19. // @grant unsafeWindow
  20. // @noframes
  21. // ==/UserScript==
  22.  
  23. (function (uWind) {
  24. 'use strict';
  25. uWind = uWind || window;
  26.  
  27. function insertCSS(cssText) {
  28. const styleEl = document.createElement('style');
  29. styleEl.textContent = cssText;
  30. document.head.appendChild(styleEl);
  31. }
  32.  
  33.  
  34. function addCSSForList() {
  35.  
  36. const style =
  37. `
  38. html {
  39. --yc-background-color: #fbfbfb;
  40. --yc-text-color: #333;
  41. --yc-border-color: #ccc;
  42. --yc-selected-background-color: #cce6ff;
  43. --yc-input-outline-color: currentColor;
  44. --yc-list-entry-mainkey-color: rgb(158, 45, 30);
  45. --yc-list-entry-minorkey-same-color: rgb(194, 185, 193);
  46. --yc-list-entry-minorkey-diff-color: rgb(199, 29, 185);
  47. }
  48. html[dark] {
  49. --yc-background-color: #222;
  50. --yc-text-color: #ddd;
  51. --yc-border-color: #555;
  52. --yc-selected-background-color: #4d4d4d;
  53. --yc-input-outline-color: #aaa;
  54. --yc-list-entry-mainkey-color: rgb(248, 160, 20);
  55. --yc-list-entry-minorkey-same-color: rgb(82, 77, 82);
  56. --yc-list-entry-minorkey-diff-color: rgb(228, 90, 217);
  57. }
  58. .list-container-wrapper{
  59. display: block;
  60. overflow-x: scroll;
  61. white-space: nowrap;
  62. -webkit-overflow-scrolling: touch;
  63. max-width: 80vw;
  64. max-height: 60vh;
  65. overflow: auto;
  66. border: 1px solid var(--yc-border-color);
  67. }
  68. .list-container {
  69. font-family: monospace;
  70. font-size: 14px;
  71. margin: 10px auto;
  72. background-color: var(--yc-background-color);
  73. color: var(--yc-text-color);
  74. display: table;
  75. border-collapse: collapse;
  76. width: calc(100% - 16px);
  77. }
  78. .list-container:focus {
  79. outline: 0;
  80. }
  81. .list-entry {
  82. display: table-row;
  83. cursor: pointer;
  84. }
  85. html body .list-container[class] .list-entry[class]{
  86. user-select: none !important;
  87. }
  88. .list-entry.selected {
  89. background-color: var(--yc-selected-background-color);
  90. }
  91. .list-entry span.key,
  92. .list-entry span.value {
  93. display: table-cell;
  94. /* padding: 2px 8px; */
  95. padding:0;
  96. }
  97. .list-entry span.key {
  98. padding-left: 4px;
  99. padding-top: 2px;
  100. padding-bottom: 2px;
  101. max-width: 38em;
  102. min-width: 12em;
  103. }
  104. .list-entry span.value {
  105. max-width: 12em;
  106. min-width: 12em;
  107. }
  108. .list-entry input.value {
  109. display: none;
  110. -webkit-appearance: none;
  111. -moz-appearance: none;
  112. appearance: none;
  113. border: none;
  114. padding: 0;
  115. font-family: inherit;
  116. font-size: inherit;
  117. cursor: text;
  118. border: 0;
  119. outline: 1px solid var(--yc-input-outline-color);
  120. border-radius: 4px;
  121. }
  122. .list-entry.editing span.value div {
  123. display: none;
  124. }
  125. .list-entry.editing input.value {
  126. display: table-cell;
  127. }
  128. .list-entry span.key {
  129. margin-right: 5px;
  130. font-weight: normal;
  131. }
  132. .list-entry.list-entry-mainkey span.key div{
  133. /* font-weight: 900 !important;*/
  134. /*
  135. color:rgb(158, 45, 30); */
  136. }
  137.  
  138. .list-entry span.key div::before{
  139. display:block;
  140. content:' ';
  141.  
  142. color: var(--yc-list-entry-mainkey-color);
  143. float:left;
  144. margin-right:8px;
  145. }
  146.  
  147. .list-entry.list-entry-mainkey span.key div::before{
  148. display:block;
  149. content:'※';
  150. color: var(--yc-list-entry-mainkey-color);
  151. float:left;
  152. margin-right:8px;
  153. }
  154. .list-entry.list-entry-minorkey-diff span.key div ,
  155. .list-entry.list-entry-minorkey-diff span.value div {
  156. font-weight: normal;
  157. color:var(--yc-list-entry-minorkey-diff-color);
  158. }
  159. .list-entry.list-entry-minorkey-same span.key div,
  160. .list-entry.list-entry-minorkey-same span.value div {
  161. font-weight: normal;
  162. color:var(--yc-list-entry-minorkey-same-color);
  163. }
  164. .list-container-wrapper::-webkit-scrollbar {
  165. width: 7px;
  166. height: 7px;
  167. }
  168. .list-container-wrapper::-webkit-scrollbar-thumb {
  169. border-radius: 4px;
  170. background-color: rgba(0, 0, 0, .5);
  171. box-shadow: 0 0 1px rgba(255, 255, 255, .5);
  172. }
  173. .list-container-wrapper::-webkit-scrollbar-thumb:hover {
  174. background-color: rgba(0, 0, 0, .7);
  175. }
  176. .list-entry span.key div,
  177. .list-entry span.value div {
  178. display: block;
  179. white-space: nowrap;
  180. overflow: hidden;
  181. text-overflow: ellipsis;
  182. }
  183. .list-entry.selected.editing span.key div{
  184. white-space: pre-wrap;
  185. height:auto;
  186. overflow-wrap: anywhere;
  187. white-space: pre-wrap !important;
  188. }
  189. .list-entry input{
  190. width: calc(100% - 32px) !important;
  191. }
  192. .list-hide-minor-same .list-entry.list-entry-minorkey-same{
  193. display:none;
  194. }
  195. .list-entry .value::before{
  196. content:':';
  197. float:left;
  198. margin-right:1em;
  199. }
  200. `;
  201.  
  202. insertCSS(style);
  203.  
  204. }
  205.  
  206. function sortEntryKeys(keysArray){
  207.  
  208. let mArr = keysArray.map(keyText => {
  209. return {
  210. keyText: keyText,
  211. sorterText: keyText.replace(/\.(\d+)\b/,(_, idx)=>{
  212. idx = ('000'+idx).slice(-4);
  213. return `.${idx}`;
  214. })
  215. };
  216. } );
  217.  
  218.  
  219. mArr.sort((a, b) => (a.sorterText > b.sorterText) ? 1 : -1);
  220.  
  221. return mArr.map(o=>o.keyText);
  222.  
  223. }
  224.  
  225.  
  226. function getModuleGetConfig() {
  227.  
  228. function getConfig() {
  229. return uWind.yt.config_;
  230. }
  231.  
  232. const prefs = {
  233. 'PLAYER_CONFIG': 40,
  234. 'PLAYER_REFERENCE': 40,
  235. 'FEEDBACK_LOCALE_LANGUAGE': 40,
  236. 'SANDBAR_LOCALE': 40,
  237. 'HL_LOCALE': 40,
  238. 'GAPI_LOCALE': 38,
  239. 'IS_TABLET': 36,
  240. 'WEB_PLAYER_CONTEXT_CONFIGS': 34,
  241. 'HL': 34,
  242. 'FILLER_DATA.player': 32,
  243. 'FILLER_DATA.player.sts': 32,
  244. 'INNERTUBE_CONTEXT': 30,
  245. 'PAGE_NAME': 28,
  246. 'LIST_ID': 26,
  247. 'INNERTUBE_CONTEXT_GL': 24,
  248. 'INNERTUBE_CONTEXT_HL': 24,
  249. 'JS_COMMON_MODULE': 22,
  250. 'BUTTON_REWORK': 20,
  251.  
  252. 'SBOX_SETTINGS.IS_POLYMER': 18,
  253.  
  254. 'DISABLE_YT_IMG_DELAY_LOADING': 16,
  255.  
  256.  
  257.  
  258.  
  259.  
  260. 'LOGGED_IN': 14,
  261. 'DELEGATED_SESSION_ID': 14,
  262. 'INNERTUBE_CONTEXT.client.visitorData': 14,
  263. 'INNERTUBE_CONTEXT_CLIENT_NAME': 14,
  264. 'INNERTUBE_CONTEXT_CLIENT_VERSION': 14,
  265. 'ID_TOKEN': 14
  266. }
  267.  
  268. const flags = `
  269. polymer_verifiy_app_state
  270. warm_load_nav_start_web
  271. kevlar_player_response_swf_config_wrapper_killswitch
  272. desktop_delay_player_resizing
  273. desktop_player_touch_gestures
  274. web_animated_like
  275. web_animated_like_lazy_load
  276. render_unicode_emojis_as_small_images
  277. kevlar_refresh_on_theme_change
  278. kevlar_watch_cinematics
  279. kevlar_watch_comments_panel_button
  280. kevlar_watch_hide_comments_while_panel_open
  281. kevlar_watch_comments_ep_disable_theater
  282. kevlar_updated_logo_icons
  283. kevlar_updated_icons
  284. kevlar_system_icons
  285. kevlar_watch_color_update
  286. desktop_mic_background
  287. web_snackbar_ui_refresh
  288. web_darker_dark_theme
  289. kevlar_updated_logo_icons
  290. kevlar_updated_icons
  291. kevlar_system_icons
  292. kevlar_watch_color_update
  293. kevlar_updated_logo_icons
  294. kevlar_updated_icons
  295. kevlar_system_icons
  296. kevlar_watch_color_update
  297. desktop_mic_background
  298. kevlar_updated_icons
  299. kevlar_system_icons
  300. kevlar_watch_color_update
  301. kevlar_watch_snap_sizing
  302. desktop_mic_background
  303. polymer_verifiy_app_state
  304. kevlar_player_response_swf_config_wrapper_killswitch
  305. desktop_player_touch_gestures
  306. kevlar_updated_icons
  307. kevlar_system_icons
  308. kevlar_watch_color_update
  309. kevlar_watch_structured_description_height_matches_player
  310. kevlar_watch_skeleton
  311. web_structure_description_show_metadata
  312. kevlar_unavailable_video_error_ui_client
  313. web_snackbar_ui_refresh
  314. kevlar_refresh_on_theme_change
  315. kevlar_watch_cinematics
  316. kevlar_watch_metadata_refresh
  317. kevlar_watch_metadata_refresh_attached_subscribe
  318. kevlar_watch_metadata_refresh_clickable_description
  319. kevlar_watch_metadata_refresh_compact_view_count
  320. kevlar_watch_metadata_refresh_description_info_dedicated_line
  321. kevlar_watch_metadata_refresh_description_inline_expander
  322. kevlar_watch_metadata_refresh_description_primary_color
  323. kevlar_watch_metadata_refresh_for_live_killswitch
  324. kevlar_watch_metadata_refresh_full_width_description
  325. kevlar_watch_metadata_refresh_narrower_item_wrap
  326. kevlar_watch_metadata_refresh_relative_date
  327. kevlar_watch_metadata_refresh_top_aligned_actions
  328. kevlar_watch_modern_metapanel
  329. kevlar_watch_modern_panels
  330. kevlar_watch_panel_height_matches_player
  331. web_animated_like
  332. web_button_rework
  333. web_button_rework_with_live
  334. web_darker_dark_theme
  335. web_filled_subscribed_button
  336. web_guide_ui_refresh
  337. web_modern_ads
  338. web_modern_buttons
  339. web_modern_chips
  340. web_modern_dialogs
  341. web_modern_playlists
  342. web_modern_subscribe
  343. web_rounded_containers
  344. web_rounded_thumbnails
  345. web_searchbar_style
  346. web_segmented_like_dislike_button
  347. web_sheets_ui_refresh
  348. web_snackbar_ui_refresh
  349. kevlar_watch_comments_panel_button
  350. kevlar_watch_hide_comments_while_panel_open
  351. kevlar_watch_comments_ep_disable_theater
  352. creator_enable_dark_theme_in_account_menu
  353. enable_playlist_list_in_content
  354. polymer_verifiy_app_state
  355. studio_system_icons
  356. `.replace(/\s*[\r\n]+\s*/g, '\n').trim().split('\n');
  357.  
  358. // console.log(flags)
  359.  
  360.  
  361. let pFlags = [...Object.keys(prefs)];
  362. let qFlags = new Set();
  363.  
  364. for (const f of pFlags) qFlags.add(`${f}`);
  365. for (const f of flags) qFlags.add(`EXPERIMENT_FLAGS.${f}`);
  366. console.log([...qFlags.keys()]);
  367.  
  368. const experFlags = {
  369.  
  370.  
  371.  
  372. }
  373.  
  374.  
  375. const logger = new Map();
  376.  
  377. const skipObjects = ['device', 'openPopupConfig', 'INNERTUBE_CONTEXT.client'];
  378. const skipper = new Set();
  379. for (const skipObject of skipObjects) {
  380. skipper.add(skipObject + '.');
  381.  
  382. }
  383.  
  384.  
  385. const keywords = [
  386. 'apiKey',
  387. 'api-key',
  388. 'API-KEY',
  389. 'SESSION',
  390. 'Id',
  391. 'ID',
  392. 'token',
  393. 'id',
  394. 'visitor',
  395. 'VISITOR',
  396. 'Visitor',
  397. 'datasyncId',
  398. 'DEVICE',
  399. 'Device',
  400. 'device',
  401. 'endpoint',
  402. 'GAPI-HINT-PARAMS',
  403. 'clickTracking',
  404. 'TRACKING',
  405. 'LOGIN-INFO',
  406. 'configData',
  407. 'SITEKEY',
  408. 'CLIENT',
  409. 'HASH',
  410. 'URL',
  411. 'URLS',
  412. 'client',
  413. 'TOKEN',
  414. 'rid',
  415. 'host',
  416. 'HOST',
  417. 'Host',
  418. 'Domain',
  419. 'DOMAIN',
  420. 'domain'
  421. ];
  422.  
  423. const keywordRegexp = new RegExp('\\b(' + keywords.join('|') + ')\\b')
  424.  
  425. function looper(obj, prefix, ws) {
  426. if (ws.has(obj)) return;
  427. ws.add(obj);
  428. if (obj instanceof Node) return;
  429. if (skipper.has(prefix)) return;
  430. for (const k of Object.keys(obj)) {
  431.  
  432.  
  433.  
  434.  
  435. let p = 0;
  436. switch (typeof obj[k]) {
  437. case 'boolean':
  438. p = 1;
  439. case 'string':
  440. case 'number':
  441. p = 2;
  442. break;
  443. case 'object':
  444. if (!obj[k]) {
  445. p = 1;
  446. }
  447. else {
  448. p = 3;
  449. }
  450. break;
  451. }
  452.  
  453. if (p == 2 || p == 3) {
  454.  
  455. if (keywordRegexp.test(k.replace(/[^a-zA-Z0-9]/g, '-'))) p = 0;
  456.  
  457. }
  458.  
  459. if (p === 1 || p === 2) {
  460.  
  461.  
  462. logger.set(prefix + k, obj[k]);
  463.  
  464. } else if (p === 3) {
  465.  
  466.  
  467. looper(obj[k], prefix + k + '.', ws);
  468. }
  469.  
  470. }
  471. }
  472.  
  473.  
  474.  
  475. let config_ = getConfig();
  476. logger.clear();
  477. looper(config_, '', new WeakSet());
  478.  
  479. let looperKeys = [...logger.keys()];
  480. looperKeys.sort();
  481. let p = {};
  482. for (const key of looperKeys) {
  483. p[key] = logger.get(key);
  484. }
  485.  
  486. return p;
  487.  
  488.  
  489. };
  490.  
  491.  
  492.  
  493. const mainKeys = [
  494. "PLAYER_CONFIG",
  495. "PLAYER_REFERENCE",
  496. "FEEDBACK_LOCALE_LANGUAGE",
  497. "SANDBAR_LOCALE",
  498. "HL_LOCALE",
  499. "GAPI_LOCALE",
  500. "IS_TABLET",
  501. "WEB_PLAYER_CONTEXT_CONFIGS",
  502. "HL",
  503. "FILLER_DATA.player",
  504. "FILLER_DATA.player.sts",
  505. "INNERTUBE_CONTEXT",
  506. "PAGE_NAME",
  507. "LIST_ID",
  508. "INNERTUBE_CONTEXT_GL",
  509. "INNERTUBE_CONTEXT_HL",
  510. "JS_COMMON_MODULE",
  511. "BUTTON_REWORK",
  512. "SBOX_SETTINGS.IS_POLYMER",
  513. "DISABLE_YT_IMG_DELAY_LOADING",
  514. "LOGGED_IN",
  515. "DELEGATED_SESSION_ID",
  516. "INNERTUBE_CONTEXT.client.visitorData",
  517. "INNERTUBE_CONTEXT_CLIENT_NAME",
  518. "INNERTUBE_CONTEXT_CLIENT_VERSION",
  519. "ID_TOKEN",
  520. "EXPERIMENT_FLAGS.polymer_verifiy_app_state",
  521. "EXPERIMENT_FLAGS.warm_load_nav_start_web",
  522. "EXPERIMENT_FLAGS.kevlar_player_response_swf_config_wrapper_killswitch",
  523. "EXPERIMENT_FLAGS.desktop_delay_player_resizing",
  524. "EXPERIMENT_FLAGS.desktop_player_touch_gestures",
  525. "EXPERIMENT_FLAGS.web_animated_like",
  526. "EXPERIMENT_FLAGS.web_animated_like_lazy_load",
  527. "EXPERIMENT_FLAGS.render_unicode_emojis_as_small_images",
  528. "EXPERIMENT_FLAGS.kevlar_refresh_on_theme_change",
  529. "EXPERIMENT_FLAGS.kevlar_watch_cinematics",
  530. "EXPERIMENT_FLAGS.kevlar_watch_comments_panel_button",
  531. "EXPERIMENT_FLAGS.kevlar_watch_hide_comments_while_panel_open",
  532. "EXPERIMENT_FLAGS.kevlar_watch_comments_ep_disable_theater",
  533. "EXPERIMENT_FLAGS.kevlar_updated_logo_icons",
  534. "EXPERIMENT_FLAGS.kevlar_updated_icons",
  535. "EXPERIMENT_FLAGS.kevlar_system_icons",
  536. "EXPERIMENT_FLAGS.kevlar_watch_color_update",
  537. "EXPERIMENT_FLAGS.desktop_mic_background",
  538. "EXPERIMENT_FLAGS.web_snackbar_ui_refresh",
  539. "EXPERIMENT_FLAGS.web_darker_dark_theme",
  540. "EXPERIMENT_FLAGS.kevlar_watch_snap_sizing",
  541. "EXPERIMENT_FLAGS.kevlar_watch_structured_description_height_matches_player",
  542. "EXPERIMENT_FLAGS.kevlar_watch_skeleton",
  543. "EXPERIMENT_FLAGS.web_structure_description_show_metadata",
  544. "EXPERIMENT_FLAGS.kevlar_unavailable_video_error_ui_client",
  545. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh",
  546. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_attached_subscribe",
  547. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_clickable_description",
  548. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_compact_view_count",
  549. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_info_dedicated_line",
  550. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_inline_expander",
  551. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_primary_color",
  552. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_for_live_killswitch",
  553. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_full_width_description",
  554. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_narrower_item_wrap",
  555. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_relative_date",
  556. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_top_aligned_actions",
  557. "EXPERIMENT_FLAGS.kevlar_watch_modern_metapanel",
  558. "EXPERIMENT_FLAGS.kevlar_watch_modern_panels",
  559. "EXPERIMENT_FLAGS.kevlar_watch_panel_height_matches_player",
  560. "EXPERIMENT_FLAGS.web_button_rework",
  561. "EXPERIMENT_FLAGS.web_button_rework_with_live",
  562. "EXPERIMENT_FLAGS.web_filled_subscribed_button",
  563. "EXPERIMENT_FLAGS.web_guide_ui_refresh",
  564. "EXPERIMENT_FLAGS.web_modern_ads",
  565. "EXPERIMENT_FLAGS.web_modern_buttons",
  566. "EXPERIMENT_FLAGS.web_modern_chips",
  567. "EXPERIMENT_FLAGS.web_modern_dialogs",
  568. "EXPERIMENT_FLAGS.web_modern_playlists",
  569. "EXPERIMENT_FLAGS.web_modern_subscribe",
  570. "EXPERIMENT_FLAGS.web_rounded_containers",
  571. "EXPERIMENT_FLAGS.web_rounded_thumbnails",
  572. "EXPERIMENT_FLAGS.web_searchbar_style",
  573. "EXPERIMENT_FLAGS.web_segmented_like_dislike_button",
  574. "EXPERIMENT_FLAGS.web_sheets_ui_refresh",
  575. "EXPERIMENT_FLAGS.creator_enable_dark_theme_in_account_menu",
  576. "EXPERIMENT_FLAGS.enable_playlist_list_in_content",
  577. "EXPERIMENT_FLAGS.studio_system_icons"
  578. ];
  579. const minorKeyValues =
  580.  
  581. {
  582. "BUTTON_REWORK": true,
  583. "CSI_SERVICE_NAME": "youtube",
  584. "DCLKSTAT": 1,
  585. "DEFERRED_DETACH": true,
  586. "DISABLE_WARM_LOADS": false,
  587. "DISABLE_YT_IMG_DELAY_LOADING": false,
  588. "ELEMENT_POOL_DEFAULT_CAP": 75,
  589. "EXPERIMENT_FLAGS.H5_async_logging_delay_ms": 30000,
  590. "EXPERIMENT_FLAGS.H5_enable_full_pacf_logging": true,
  591. "EXPERIMENT_FLAGS.H5_use_async_logging": true,
  592. "EXPERIMENT_FLAGS.addto_ajax_log_warning_fraction": 0.1,
  593. "EXPERIMENT_FLAGS.allow_skip_networkless": true,
  594. "EXPERIMENT_FLAGS.autoescape_tempdata_url": true,
  595. "EXPERIMENT_FLAGS.autoplay_pause_by_lact_sampling_fraction": 0,
  596. "EXPERIMENT_FLAGS.autoplay_pause_by_lact_sec": 0,
  597. "EXPERIMENT_FLAGS.autoplay_time": 8000,
  598. "EXPERIMENT_FLAGS.autoplay_time_for_fullscreen": 3000,
  599. "EXPERIMENT_FLAGS.autoplay_time_for_music_content": 3000,
  600. "EXPERIMENT_FLAGS.background_thread_flush_logs_due_to_batch_limit": true,
  601. "EXPERIMENT_FLAGS.botguard_async_snapshot_timeout_ms": 3000,
  602. "EXPERIMENT_FLAGS.browse_ajax_log_warning_fraction": 1,
  603. "EXPERIMENT_FLAGS.browse_next_continuations_migration_playlist": true,
  604. "EXPERIMENT_FLAGS.c3_watch_page_component": true,
  605. "EXPERIMENT_FLAGS.cache_utc_offset_minutes_in_pref_cookie": true,
  606. "EXPERIMENT_FLAGS.cancel_pending_navs": true,
  607. "EXPERIMENT_FLAGS.caption_edit_on_hover": true,
  608. "EXPERIMENT_FLAGS.check_navigator_accuracy_timeout_ms": 0,
  609. "EXPERIMENT_FLAGS.check_user_lact_at_prompt_shown_time_on_web": true,
  610. "EXPERIMENT_FLAGS.cinematic_watch_css_filter_blur_strength": 40,
  611. "EXPERIMENT_FLAGS.cinematic_watch_effect_opacity": 0.4,
  612. "EXPERIMENT_FLAGS.cinematic_watch_fade_out_duration": 500,
  613. "EXPERIMENT_FLAGS.clear_user_partitioned_ls": true,
  614. "EXPERIMENT_FLAGS.cloud_save_game_data_rate_limit_ms": 3000,
  615. "EXPERIMENT_FLAGS.cold_missing_history": true,
  616. "EXPERIMENT_FLAGS.compress_gel": true,
  617. "EXPERIMENT_FLAGS.compression_disable_point": 10,
  618. "EXPERIMENT_FLAGS.compression_performance_threshold": 250,
  619. "EXPERIMENT_FLAGS.csi_on_gel": true,
  620. "EXPERIMENT_FLAGS.debug_forced_internalcountrycode": "",
  621. "EXPERIMENT_FLAGS.decorate_autoplay_renderer": true,
  622. "EXPERIMENT_FLAGS.defer_menus": true,
  623. "EXPERIMENT_FLAGS.defer_overlays": true,
  624. "EXPERIMENT_FLAGS.defer_rendering_outside_visible_area": true,
  625. "EXPERIMENT_FLAGS.deprecate_csi_has_info": true,
  626. "EXPERIMENT_FLAGS.deprecate_pair_servlet_enabled": true,
  627. "EXPERIMENT_FLAGS.deprecate_two_way_binding_child": true,
  628. "EXPERIMENT_FLAGS.deprecate_two_way_binding_parent": true,
  629. "EXPERIMENT_FLAGS.desktop_add_to_playlist_renderer_dialog_popup": true,
  630. "EXPERIMENT_FLAGS.desktop_adjust_touch_target": true,
  631. "EXPERIMENT_FLAGS.desktop_animate_miniplayer": true,
  632. "EXPERIMENT_FLAGS.desktop_delay_player_resizing": true,
  633. "EXPERIMENT_FLAGS.desktop_enable_dmpanel_click_drag_scroll": true,
  634. "EXPERIMENT_FLAGS.desktop_enable_dmpanel_scroll": true,
  635. "EXPERIMENT_FLAGS.desktop_enable_dmpanel_wheel_scroll": true,
  636. "EXPERIMENT_FLAGS.desktop_image_cta_no_background": true,
  637. "EXPERIMENT_FLAGS.desktop_keyboard_capture_keydown_killswitch": true,
  638. "EXPERIMENT_FLAGS.desktop_log_img_click_location": true,
  639. "EXPERIMENT_FLAGS.desktop_mix_use_sampled_color_for_bottom_bar": true,
  640. "EXPERIMENT_FLAGS.desktop_mix_use_sampled_color_for_bottom_bar_search": true,
  641. "EXPERIMENT_FLAGS.desktop_mix_use_sampled_color_for_bottom_bar_watch_next": true,
  642. "EXPERIMENT_FLAGS.desktop_notification_high_priority_ignore_push": true,
  643. "EXPERIMENT_FLAGS.desktop_notification_set_title_bar": true,
  644. "EXPERIMENT_FLAGS.desktop_persistent_menu": true,
  645. "EXPERIMENT_FLAGS.desktop_search_bigger_thumbs_style": "DEFAULT",
  646. "EXPERIMENT_FLAGS.desktop_search_prominent_thumbs": true,
  647. "EXPERIMENT_FLAGS.desktop_search_suggestion_tap_target": 0,
  648. "EXPERIMENT_FLAGS.desktop_searchbar_style": "default",
  649. "EXPERIMENT_FLAGS.desktop_sparkles_light_cta_button": true,
  650. "EXPERIMENT_FLAGS.desktop_swipeable_guide": true,
  651. "EXPERIMENT_FLAGS.desktop_themeable_vulcan": true,
  652. "EXPERIMENT_FLAGS.desktop_touch_gestures_usage_log": true,
  653. "EXPERIMENT_FLAGS.desktop_use_new_history_manager": true,
  654. "EXPERIMENT_FLAGS.disable_child_node_auto_formatted_strings": true,
  655. "EXPERIMENT_FLAGS.disable_dependency_injection": true,
  656. "EXPERIMENT_FLAGS.disable_features_for_supex": true,
  657. "EXPERIMENT_FLAGS.disable_legacy_desktop_remote_queue": true,
  658. "EXPERIMENT_FLAGS.disable_pacf_logging_for_memory_limited_tv": true,
  659. "EXPERIMENT_FLAGS.disable_rich_grid_inline_player_pop_out": true,
  660. "EXPERIMENT_FLAGS.disable_simple_mixed_direction_formatted_strings": true,
  661. "EXPERIMENT_FLAGS.disable_thumbnail_preloading": true,
  662. "EXPERIMENT_FLAGS.embeds_web_enable_replace_unload_w_pagehide": true,
  663. "EXPERIMENT_FLAGS.embeds_web_enable_ve_logging_unification": true,
  664. "EXPERIMENT_FLAGS.embeds_web_nwl_disable_nocookie": true,
  665. "EXPERIMENT_FLAGS.embeds_web_synth_ch_headers_banned_urls_regex": "",
  666. "EXPERIMENT_FLAGS.enable_audio_pivot_back_nav_button": true,
  667. "EXPERIMENT_FLAGS.enable_button_behavior_reuse": true,
  668. "EXPERIMENT_FLAGS.enable_call_to_action_clarification_renderer_bottom_section_conditions": true,
  669. "EXPERIMENT_FLAGS.enable_channel_page_modern_profile_section": true,
  670. "EXPERIMENT_FLAGS.enable_desktop_amsterdam_info_panels": true,
  671. "EXPERIMENT_FLAGS.enable_dma_web_toast": true,
  672. "EXPERIMENT_FLAGS.enable_docked_chat_messages": true,
  673. "EXPERIMENT_FLAGS.enable_gel_log_commands": true,
  674. "EXPERIMENT_FLAGS.enable_h5_instream_watch_next_params_oarlib": true,
  675. "EXPERIMENT_FLAGS.enable_h5_video_ads_oarlib": true,
  676. "EXPERIMENT_FLAGS.enable_handles_account_menu_switcher": true,
  677. "EXPERIMENT_FLAGS.enable_handles_in_mention_suggest_posts": true,
  678. "EXPERIMENT_FLAGS.enable_header_channel_handler_ui": true,
  679. "EXPERIMENT_FLAGS.enable_image_poll_post_creation": true,
  680. "EXPERIMENT_FLAGS.enable_inline_shorts_on_wn": true,
  681. "EXPERIMENT_FLAGS.enable_madison_search_migration": true,
  682. "EXPERIMENT_FLAGS.enable_masthead_quartile_ping_fix": true,
  683. "EXPERIMENT_FLAGS.enable_memberships_and_purchases": true,
  684. "EXPERIMENT_FLAGS.enable_mentions_in_reposts": true,
  685. "EXPERIMENT_FLAGS.enable_microformat_data": true,
  686. "EXPERIMENT_FLAGS.enable_mini_app_container": true,
  687. "EXPERIMENT_FLAGS.enable_mixed_direction_formatted_strings": true,
  688. "EXPERIMENT_FLAGS.enable_multi_image_post_creation": true,
  689. "EXPERIMENT_FLAGS.enable_names_handles_account_switcher": true,
  690. "EXPERIMENT_FLAGS.enable_offer_suppression": true,
  691. "EXPERIMENT_FLAGS.enable_on_yt_command_executor_command_to_navigate": true,
  692. "EXPERIMENT_FLAGS.enable_pacf_through_ybfe_tv": true,
  693. "EXPERIMENT_FLAGS.enable_pacf_through_ysfe_tv": true,
  694. "EXPERIMENT_FLAGS.enable_poll_choice_border_on_web": true,
  695. "EXPERIMENT_FLAGS.enable_polymer_resin": true,
  696. "EXPERIMENT_FLAGS.enable_polymer_resin_migration": true,
  697. "EXPERIMENT_FLAGS.enable_post_cct_links": true,
  698. "EXPERIMENT_FLAGS.enable_post_scheduling": true,
  699. "EXPERIMENT_FLAGS.enable_premium_voluntary_pause": true,
  700. "EXPERIMENT_FLAGS.enable_product_list_skip_pdp_for_desktop": true,
  701. "EXPERIMENT_FLAGS.enable_programmed_playlist_color_sample": true,
  702. "EXPERIMENT_FLAGS.enable_programmed_playlist_redesign": true,
  703. "EXPERIMENT_FLAGS.enable_purchase_activity_in_paid_memberships": true,
  704. "EXPERIMENT_FLAGS.enable_reel_watch_sequence": true,
  705. "EXPERIMENT_FLAGS.enable_rejected_sasde_for_html5": true,
  706. "EXPERIMENT_FLAGS.enable_rendererstamper_listener_cleanup": true,
  707. "EXPERIMENT_FLAGS.enable_seedless_shorts_url": true,
  708. "EXPERIMENT_FLAGS.enable_server_stitched_dai": true,
  709. "EXPERIMENT_FLAGS.enable_service_ajax_csn": true,
  710. "EXPERIMENT_FLAGS.enable_servlet_errors_streamz": true,
  711. "EXPERIMENT_FLAGS.enable_servlet_streamz": true,
  712. "EXPERIMENT_FLAGS.enable_sfv_audio_pivot_url": true,
  713. "EXPERIMENT_FLAGS.enable_shorts_singleton_channel_web": true,
  714. "EXPERIMENT_FLAGS.enable_signals": true,
  715. "EXPERIMENT_FLAGS.enable_skip_ad_guidance_prompt": true,
  716. "EXPERIMENT_FLAGS.enable_skippable_ads_for_unplugged_ad_pod": true,
  717. "EXPERIMENT_FLAGS.enable_smearing_expansion_dai": true,
  718. "EXPERIMENT_FLAGS.enable_sparkles_web_clickable_description": true,
  719. "EXPERIMENT_FLAGS.enable_squiffle_gif_handles_landing_page": true,
  720. "EXPERIMENT_FLAGS.enable_streamline_repost_flow": true,
  721. "EXPERIMENT_FLAGS.enable_structured_description_shorts_web_mweb": true,
  722. "EXPERIMENT_FLAGS.enable_tectonic_ad_ux_for_halftime": true,
  723. "EXPERIMENT_FLAGS.enable_third_party_info": true,
  724. "EXPERIMENT_FLAGS.enable_topsoil_wta_for_halftime_live_infra": true,
  725. "EXPERIMENT_FLAGS.enable_unavailable_videos_watch_page": true,
  726. "EXPERIMENT_FLAGS.enable_watch_next_pause_autoplay_lact": true,
  727. "EXPERIMENT_FLAGS.enable_web_ketchup_hero_animation": true,
  728. "EXPERIMENT_FLAGS.enable_web_poster_hover_animation": true,
  729. "EXPERIMENT_FLAGS.enable_web_scheduler_signals": true,
  730. "EXPERIMENT_FLAGS.enable_web_shorts_audio_pivot": true,
  731. "EXPERIMENT_FLAGS.enable_window_constrained_buy_flow_dialog": true,
  732. "EXPERIMENT_FLAGS.enable_yoodle": true,
  733. "EXPERIMENT_FLAGS.enable_ypc_spinners": true,
  734. "EXPERIMENT_FLAGS.enable_yt_ata_iframe_authuser": true,
  735. "EXPERIMENT_FLAGS.enable_ytc_refunds_submit_form_signal_action": true,
  736. "EXPERIMENT_FLAGS.enable_ytc_self_serve_refunds": true,
  737. "EXPERIMENT_FLAGS.export_networkless_options": true,
  738. "EXPERIMENT_FLAGS.external_fullscreen": true,
  739. "EXPERIMENT_FLAGS.external_fullscreen_button_click_threshold": 2,
  740. "EXPERIMENT_FLAGS.external_fullscreen_button_shown_threshold": 10,
  741. "EXPERIMENT_FLAGS.external_fullscreen_with_edu": true,
  742. "EXPERIMENT_FLAGS.fill_single_video_with_notify_to_lasr": true,
  743. "EXPERIMENT_FLAGS.fix_scrubber_overlay_transition": true,
  744. "EXPERIMENT_FLAGS.formatted_description_log_warning_fraction": 0.01,
  745. "EXPERIMENT_FLAGS.gcf_config_store_enabled": true,
  746. "EXPERIMENT_FLAGS.gda_enable_playlist_download": true,
  747. "EXPERIMENT_FLAGS.gel_queue_timeout_max_ms": 300000,
  748. "EXPERIMENT_FLAGS.get_async_timeout_ms": 60000,
  749. "EXPERIMENT_FLAGS.gfeedback_for_signed_out_users_enabled": true,
  750. "EXPERIMENT_FLAGS.global_spacebar_pause": true,
  751. "EXPERIMENT_FLAGS.gpa_sparkles_ten_percent_layer": true,
  752. "EXPERIMENT_FLAGS.guide_business_info_countries.0": "KR",
  753. "EXPERIMENT_FLAGS.guide_legal_footer_enabled_countries.0": "NL",
  754. "EXPERIMENT_FLAGS.guide_legal_footer_enabled_countries.1": "ES",
  755. "EXPERIMENT_FLAGS.h5_companion_enable_adcpn_macro_substitution_for_click_pings": true,
  756. "EXPERIMENT_FLAGS.h5_enable_generic_error_logging_event": true,
  757. "EXPERIMENT_FLAGS.h5_inplayer_enable_adcpn_macro_substitution_for_click_pings": true,
  758. "EXPERIMENT_FLAGS.h5_reset_cache_and_filter_before_update_masthead": true,
  759. "EXPERIMENT_FLAGS.handles_in_mention_suggest_posts": true,
  760. "EXPERIMENT_FLAGS.high_priority_flyout_frequency": 3,
  761. "EXPERIMENT_FLAGS.html5_enable_single_video_vod_ivar_on_pacf": true,
  762. "EXPERIMENT_FLAGS.html5_log_trigger_events_with_debug_data": true,
  763. "EXPERIMENT_FLAGS.html5_recognize_predict_start_cue_point": true,
  764. "EXPERIMENT_FLAGS.html5_server_stitched_dai_group": true,
  765. "EXPERIMENT_FLAGS.html5_web_enable_halftime_preroll": true,
  766. "EXPERIMENT_FLAGS.il_use_view_model_logging_context": true,
  767. "EXPERIMENT_FLAGS.include_autoplay_count_in_playlists": true,
  768. "EXPERIMENT_FLAGS.initial_gel_batch_timeout": 2000,
  769. "EXPERIMENT_FLAGS.is_browser_support_for_webcam_streaming": true,
  770. "EXPERIMENT_FLAGS.is_part_of_any_user_engagement_experiment": true,
  771. "EXPERIMENT_FLAGS.json_condensed_response": true,
  772. "EXPERIMENT_FLAGS.kevlar_app_shortcuts": true,
  773. "EXPERIMENT_FLAGS.kevlar_appbehavior_attach_startup_tasks": true,
  774. "EXPERIMENT_FLAGS.kevlar_append_toggled_engagement_panels_top": true,
  775. "EXPERIMENT_FLAGS.kevlar_appshell_service_worker": true,
  776. "EXPERIMENT_FLAGS.kevlar_autofocus_menu_on_keyboard_nav": true,
  777. "EXPERIMENT_FLAGS.kevlar_autonav_popup_filtering": true,
  778. "EXPERIMENT_FLAGS.kevlar_av_eliminate_polling": true,
  779. "EXPERIMENT_FLAGS.kevlar_background_color_update": true,
  780. "EXPERIMENT_FLAGS.kevlar_cache_cold_load_response": true,
  781. "EXPERIMENT_FLAGS.kevlar_cache_on_ttl_player": true,
  782. "EXPERIMENT_FLAGS.kevlar_cache_on_ttl_search": true,
  783. "EXPERIMENT_FLAGS.kevlar_calculate_grid_collapsible": true,
  784. "EXPERIMENT_FLAGS.kevlar_cancel_scheduled_comment_jobs_on_navigate": true,
  785. "EXPERIMENT_FLAGS.kevlar_center_search_results": true,
  786. "EXPERIMENT_FLAGS.kevlar_channel_creation_form_resolver": true,
  787. "EXPERIMENT_FLAGS.kevlar_channel_trailer_multi_attach": true,
  788. "EXPERIMENT_FLAGS.kevlar_chapters_list_view_seek_by_chapter": true,
  789. "EXPERIMENT_FLAGS.kevlar_clear_duplicate_pref_cookie": true,
  790. "EXPERIMENT_FLAGS.kevlar_clear_non_displayable_url_params": true,
  791. "EXPERIMENT_FLAGS.kevlar_command_handler": true,
  792. "EXPERIMENT_FLAGS.kevlar_command_handler_clicks": true,
  793. "EXPERIMENT_FLAGS.kevlar_command_handler_formatted_string": true,
  794. "EXPERIMENT_FLAGS.kevlar_command_url": true,
  795. "EXPERIMENT_FLAGS.kevlar_continue_playback_without_player_response": true,
  796. "EXPERIMENT_FLAGS.kevlar_delay_watch_initial_data": true,
  797. "EXPERIMENT_FLAGS.kevlar_disable_background_prefetch": true,
  798. "EXPERIMENT_FLAGS.kevlar_disable_pending_command": true,
  799. "EXPERIMENT_FLAGS.kevlar_dragdrop_fast_scroll": true,
  800. "EXPERIMENT_FLAGS.kevlar_dropdown_fix": true,
  801. "EXPERIMENT_FLAGS.kevlar_droppable_prefetchable_requests": true,
  802. "EXPERIMENT_FLAGS.kevlar_early_popup_close": true,
  803. "EXPERIMENT_FLAGS.kevlar_enable_download_upsell_type_a": true,
  804. "EXPERIMENT_FLAGS.kevlar_enable_editable_playlists": true,
  805. "EXPERIMENT_FLAGS.kevlar_enable_reorderable_playlists": true,
  806. "EXPERIMENT_FLAGS.kevlar_enable_shorts_prefetch_in_sequence": true,
  807. "EXPERIMENT_FLAGS.kevlar_enable_shorts_response_chunking": true,
  808. "EXPERIMENT_FLAGS.kevlar_enable_up_arrow": true,
  809. "EXPERIMENT_FLAGS.kevlar_enable_upsell_on_video_menu": true,
  810. "EXPERIMENT_FLAGS.kevlar_enable_ybp_op_for_shoptube": true,
  811. "EXPERIMENT_FLAGS.kevlar_exit_fullscreen_leaving_watch": true,
  812. "EXPERIMENT_FLAGS.kevlar_fix_playlist_continuation": true,
  813. "EXPERIMENT_FLAGS.kevlar_flexible_menu": true,
  814. "EXPERIMENT_FLAGS.kevlar_fluid_touch_scroll": true,
  815. "EXPERIMENT_FLAGS.kevlar_frontend_queue_recover": true,
  816. "EXPERIMENT_FLAGS.kevlar_gel_error_routing": true,
  817. "EXPERIMENT_FLAGS.kevlar_guide_refresh": true,
  818. "EXPERIMENT_FLAGS.kevlar_help_use_locale": true,
  819. "EXPERIMENT_FLAGS.kevlar_hide_playlist_playback_status": true,
  820. "EXPERIMENT_FLAGS.kevlar_hide_pp_url_param": true,
  821. "EXPERIMENT_FLAGS.kevlar_hide_time_continue_url_param": true,
  822. "EXPERIMENT_FLAGS.kevlar_home_skeleton": true,
  823. "EXPERIMENT_FLAGS.kevlar_home_skeleton_hide_later": true,
  824. "EXPERIMENT_FLAGS.kevlar_js_fixes": true,
  825. "EXPERIMENT_FLAGS.kevlar_keyboard_button_focus": true,
  826. "EXPERIMENT_FLAGS.kevlar_larger_three_dot_tap": true,
  827. "EXPERIMENT_FLAGS.kevlar_lazy_list_resume_for_autofill": true,
  828. "EXPERIMENT_FLAGS.kevlar_link_capturing_mode": "",
  829. "EXPERIMENT_FLAGS.kevlar_local_innertube_response": true,
  830. "EXPERIMENT_FLAGS.kevlar_macro_markers_keyboard_shortcut": true,
  831. "EXPERIMENT_FLAGS.kevlar_masthead_store": true,
  832. "EXPERIMENT_FLAGS.kevlar_mealbar_above_player": true,
  833. "EXPERIMENT_FLAGS.kevlar_mini_guide_width_threshold": 791,
  834. "EXPERIMENT_FLAGS.kevlar_miniplayer": true,
  835. "EXPERIMENT_FLAGS.kevlar_miniplayer_expand_top": true,
  836. "EXPERIMENT_FLAGS.kevlar_miniplayer_play_pause_on_scrim": true,
  837. "EXPERIMENT_FLAGS.kevlar_miniplayer_queue_user_activation": true,
  838. "EXPERIMENT_FLAGS.kevlar_modern_sd": true,
  839. "EXPERIMENT_FLAGS.kevlar_next_cold_on_auth_change_detected": true,
  840. "EXPERIMENT_FLAGS.kevlar_nitrate_driven_tooltips": true,
  841. "EXPERIMENT_FLAGS.kevlar_no_autoscroll_on_playlist_hover": true,
  842. "EXPERIMENT_FLAGS.kevlar_op_infra": true,
  843. "EXPERIMENT_FLAGS.kevlar_op_warm_pages": true,
  844. "EXPERIMENT_FLAGS.kevlar_pandown_polyfill": true,
  845. "EXPERIMENT_FLAGS.kevlar_passive_event_listeners": true,
  846. "EXPERIMENT_FLAGS.kevlar_persistent_guide_width_threshold": 1312,
  847. "EXPERIMENT_FLAGS.kevlar_playback_associated_queue": true,
  848. "EXPERIMENT_FLAGS.kevlar_player_cached_load_config": true,
  849. "EXPERIMENT_FLAGS.kevlar_player_check_ad_state_on_stop": true,
  850. "EXPERIMENT_FLAGS.kevlar_player_load_player_no_op": true,
  851. "EXPERIMENT_FLAGS.kevlar_player_new_bootstrap_adoption": true,
  852. "EXPERIMENT_FLAGS.kevlar_player_playlist_use_local_index": true,
  853. "EXPERIMENT_FLAGS.kevlar_playlist_drag_handles": true,
  854. "EXPERIMENT_FLAGS.kevlar_playlist_use_x_close_button": true,
  855. "EXPERIMENT_FLAGS.kevlar_prefetch": true,
  856. "EXPERIMENT_FLAGS.kevlar_prevent_polymer_dynamic_font_load": true,
  857. "EXPERIMENT_FLAGS.kevlar_queue_use_update_api": true,
  858. "EXPERIMENT_FLAGS.kevlar_refresh_gesture": true,
  859. "EXPERIMENT_FLAGS.kevlar_refresh_on_theme_change": true,
  860. "EXPERIMENT_FLAGS.kevlar_rendererstamper_event_listener": true,
  861. "EXPERIMENT_FLAGS.kevlar_replace_short_to_short_history_state": true,
  862. "EXPERIMENT_FLAGS.kevlar_request_sequencing": true,
  863. "EXPERIMENT_FLAGS.kevlar_resolve_command_for_confirm_dialog": true,
  864. "EXPERIMENT_FLAGS.kevlar_response_command_processor_page": true,
  865. "EXPERIMENT_FLAGS.kevlar_scroll_chips_on_touch": true,
  866. "EXPERIMENT_FLAGS.kevlar_scrollbar_rework": true,
  867. "EXPERIMENT_FLAGS.kevlar_service_command_check": true,
  868. "EXPERIMENT_FLAGS.kevlar_set_internal_player_size": true,
  869. "EXPERIMENT_FLAGS.kevlar_set_sd_enabled_browse_request": true,
  870. "EXPERIMENT_FLAGS.kevlar_shell_for_downloads_page": true,
  871. "EXPERIMENT_FLAGS.kevlar_should_maintain_stable_list": true,
  872. "EXPERIMENT_FLAGS.kevlar_show_playlist_dl_btn": true,
  873. "EXPERIMENT_FLAGS.kevlar_simp_shorts_reset_scroll": true,
  874. "EXPERIMENT_FLAGS.kevlar_smart_downloads": true,
  875. "EXPERIMENT_FLAGS.kevlar_smart_downloads_setting": true,
  876. "EXPERIMENT_FLAGS.kevlar_startup_lifecycle": true,
  877. "EXPERIMENT_FLAGS.kevlar_structured_description_content_inline": true,
  878. "EXPERIMENT_FLAGS.kevlar_system_icons": true,
  879. "EXPERIMENT_FLAGS.kevlar_tabs_gesture": true,
  880. "EXPERIMENT_FLAGS.kevlar_text_inline_expander_formatted_snippet": true,
  881. "EXPERIMENT_FLAGS.kevlar_three_dot_ink": true,
  882. "EXPERIMENT_FLAGS.kevlar_thumbnail_fluid": true,
  883. "EXPERIMENT_FLAGS.kevlar_time_caching_end_threshold": 15,
  884. "EXPERIMENT_FLAGS.kevlar_time_caching_start_threshold": 15,
  885. "EXPERIMENT_FLAGS.kevlar_toast_manager": true,
  886. "EXPERIMENT_FLAGS.kevlar_tooltip_impression_cap": 2,
  887. "EXPERIMENT_FLAGS.kevlar_topbar_logo_fallback_home": true,
  888. "EXPERIMENT_FLAGS.kevlar_touch_feedback": true,
  889. "EXPERIMENT_FLAGS.kevlar_touch_feedback_lockups": true,
  890. "EXPERIMENT_FLAGS.kevlar_touch_gesture_ves": true,
  891. "EXPERIMENT_FLAGS.kevlar_transcript_engagement_panel": true,
  892. "EXPERIMENT_FLAGS.kevlar_tuner_default_comments_delay": 1000,
  893. "EXPERIMENT_FLAGS.kevlar_tuner_run_default_comments_delay": true,
  894. "EXPERIMENT_FLAGS.kevlar_tuner_scheduler_soft_state_timer_ms": 800,
  895. "EXPERIMENT_FLAGS.kevlar_tuner_should_defer_detach": true,
  896. "EXPERIMENT_FLAGS.kevlar_tuner_thumbnail_factor": 1,
  897. "EXPERIMENT_FLAGS.kevlar_tuner_visibility_time_between_jobs_ms": 100,
  898. "EXPERIMENT_FLAGS.kevlar_typography_spacing_update": true,
  899. "EXPERIMENT_FLAGS.kevlar_typography_update": true,
  900. "EXPERIMENT_FLAGS.kevlar_undo_delete": true,
  901. "EXPERIMENT_FLAGS.kevlar_unified_errors_init": true,
  902. "EXPERIMENT_FLAGS.kevlar_unified_player_logging_threshold": 1,
  903. "EXPERIMENT_FLAGS.kevlar_use_response_ttl_to_invalidate_cache": true,
  904. "EXPERIMENT_FLAGS.kevlar_use_vimio_behavior": true,
  905. "EXPERIMENT_FLAGS.kevlar_use_ytd_player": true,
  906. "EXPERIMENT_FLAGS.kevlar_variable_youtube_sans": true,
  907. "EXPERIMENT_FLAGS.kevlar_vimio_use_shared_monitor": true,
  908. "EXPERIMENT_FLAGS.kevlar_voice_logging_fix": true,
  909. "EXPERIMENT_FLAGS.kevlar_voice_search": true,
  910. "EXPERIMENT_FLAGS.kevlar_watch_cinematics": true,
  911. "EXPERIMENT_FLAGS.kevlar_watch_color_update": true,
  912. "EXPERIMENT_FLAGS.kevlar_watch_comments_ep_disable_theater": true,
  913. "EXPERIMENT_FLAGS.kevlar_watch_contents_data_provider": true,
  914. "EXPERIMENT_FLAGS.kevlar_watch_contents_data_provider_persistent": true,
  915. "EXPERIMENT_FLAGS.kevlar_watch_disable_legacy_metadata_updates": true,
  916. "EXPERIMENT_FLAGS.kevlar_watch_drag_handles": true,
  917. "EXPERIMENT_FLAGS.kevlar_watch_flexy_fullscreen_manager": true,
  918. "EXPERIMENT_FLAGS.kevlar_watch_flexy_loading_state_manager": true,
  919. "EXPERIMENT_FLAGS.kevlar_watch_flexy_metadata_height": 136,
  920. "EXPERIMENT_FLAGS.kevlar_watch_flexy_miniplayer_manager": true,
  921. "EXPERIMENT_FLAGS.kevlar_watch_flexy_navigation_manager": true,
  922. "EXPERIMENT_FLAGS.kevlar_watch_flexy_player_loop_manager": true,
  923. "EXPERIMENT_FLAGS.kevlar_watch_flexy_scroll_manager": true,
  924. "EXPERIMENT_FLAGS.kevlar_watch_flexy_title_manager": true,
  925. "EXPERIMENT_FLAGS.kevlar_watch_flexy_use_controller": true,
  926. "EXPERIMENT_FLAGS.kevlar_watch_focus_on_engagement_panels": true,
  927. "EXPERIMENT_FLAGS.kevlar_watch_gesture_pandown": true,
  928. "EXPERIMENT_FLAGS.kevlar_watch_hide_comments_teaser": true,
  929. "EXPERIMENT_FLAGS.kevlar_watch_hide_comments_while_panel_open": true,
  930. "EXPERIMENT_FLAGS.kevlar_watch_js_panel_height": true,
  931. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh": true,
  932. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_attached_subscribe": true,
  933. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_clickable_description": true,
  934. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_compact_view_count": true,
  935. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_info_dedicated_line": true,
  936. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_inline_expander": true,
  937. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_lines": 3,
  938. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_description_primary_color": true,
  939. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_for_live_killswitch": true,
  940. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_full_width_description": true,
  941. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_left_aligned_video_actions": true,
  942. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_lower_case_video_actions": true,
  943. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_narrower_item_wrap": true,
  944. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_relative_date": true,
  945. "EXPERIMENT_FLAGS.kevlar_watch_metadata_refresh_top_aligned_actions": true,
  946. "EXPERIMENT_FLAGS.kevlar_watch_modern_metapanel": true,
  947. "EXPERIMENT_FLAGS.kevlar_watch_modern_panels": true,
  948. "EXPERIMENT_FLAGS.kevlar_watch_panel_height_matches_player": true,
  949. "EXPERIMENT_FLAGS.kevlar_woffle": true,
  950. "EXPERIMENT_FLAGS.kevlar_woffle_fallback_image": true,
  951. "EXPERIMENT_FLAGS.kevlar_ytb_live_badges": true,
  952. "EXPERIMENT_FLAGS.killswitch_toggle_button_behavior_resolve_command": true,
  953. "EXPERIMENT_FLAGS.live_chat_banner_expansion_fix": true,
  954. "EXPERIMENT_FLAGS.live_chat_chunk_rendering": 0,
  955. "EXPERIMENT_FLAGS.live_chat_collapse_merch_banner": true,
  956. "EXPERIMENT_FLAGS.live_chat_enable_mod_view": true,
  957. "EXPERIMENT_FLAGS.live_chat_enable_qna_banner_overflow_menu_actions": true,
  958. "EXPERIMENT_FLAGS.live_chat_enable_qna_channel": true,
  959. "EXPERIMENT_FLAGS.live_chat_filter_emoji_suggestions": true,
  960. "EXPERIMENT_FLAGS.live_chat_increased_min_height": true,
  961. "EXPERIMENT_FLAGS.live_chat_max_chunk_size": 5,
  962. "EXPERIMENT_FLAGS.live_chat_min_chunk_interval_ms": 300,
  963. "EXPERIMENT_FLAGS.live_chat_over_playlist": true,
  964. "EXPERIMENT_FLAGS.live_chat_unicode_emoji_json_url": "https://www.gstatic.com/youtube/img/emojis/emojis-svg-9.json",
  965. "EXPERIMENT_FLAGS.live_chat_web_enable_command_handler": true,
  966. "EXPERIMENT_FLAGS.live_chat_web_use_emoji_manager_singleton": true,
  967. "EXPERIMENT_FLAGS.log_errors_through_nwl_on_retry": true,
  968. "EXPERIMENT_FLAGS.log_gel_compression_latency": true,
  969. "EXPERIMENT_FLAGS.log_heartbeat_with_lifecycles": true,
  970. "EXPERIMENT_FLAGS.log_vis_on_tab_change": true,
  971. "EXPERIMENT_FLAGS.log_web_meta_interval_ms": 0,
  972. "EXPERIMENT_FLAGS.log_window_onerror_fraction": 0.1,
  973. "EXPERIMENT_FLAGS.max_body_size_to_compress": 500000,
  974. "EXPERIMENT_FLAGS.max_duration_to_consider_mouseover_as_hover": 600000,
  975. // "EXPERIMENT_FLAGS.max_prefetch_window_sec_for_livestream_optimization": 10,
  976. "EXPERIMENT_FLAGS.mdx_enable_privacy_disclosure_ui": true,
  977. "EXPERIMENT_FLAGS.mdx_load_cast_api_bootstrap_script": true,
  978. "EXPERIMENT_FLAGS.migrate_events_to_ts": true,
  979. "EXPERIMENT_FLAGS.min_mouse_still_duration": 100,
  980. // "EXPERIMENT_FLAGS.min_prefetch_offset_sec_for_livestream_optimization": 20,
  981. "EXPERIMENT_FLAGS.minimum_duration_to_consider_mouseover_as_hover": 500,
  982. "EXPERIMENT_FLAGS.music_on_main_handle_playlist_edit_video_added_result_data": true,
  983. "EXPERIMENT_FLAGS.music_on_main_open_playlist_recommended_videos_in_miniplayer": true,
  984. "EXPERIMENT_FLAGS.mweb_actions_command_handler": true,
  985. "EXPERIMENT_FLAGS.mweb_command_handler": true,
  986. "EXPERIMENT_FLAGS.mweb_disable_set_autonav_state_in_player": true,
  987. "EXPERIMENT_FLAGS.mweb_enable_consistency_service": true,
  988. "EXPERIMENT_FLAGS.mweb_enable_hlp": true,
  989. "EXPERIMENT_FLAGS.mweb_history_manager_cache_size": 100,
  990. "EXPERIMENT_FLAGS.mweb_logo_use_home_page_ve": true,
  991. "EXPERIMENT_FLAGS.mweb_navigate_to_watch_with_op": true,
  992. "EXPERIMENT_FLAGS.mweb_render_crawler_description": true,
  993. "EXPERIMENT_FLAGS.mweb_stop_truncating_meta_tags": true,
  994. "EXPERIMENT_FLAGS.mweb_use_desktop_canonical_url": true,
  995. "EXPERIMENT_FLAGS.network_polling_interval": 30000,
  996. "EXPERIMENT_FLAGS.networkless_gel": true,
  997. "EXPERIMENT_FLAGS.networkless_logging": true,
  998. "EXPERIMENT_FLAGS.no_sub_count_on_sub_button": true,
  999. "EXPERIMENT_FLAGS.nwl_send_fast_on_unload": true,
  1000. "EXPERIMENT_FLAGS.nwl_send_from_memory_when_online": true,
  1001. "EXPERIMENT_FLAGS.offline_error_handling": true,
  1002. "EXPERIMENT_FLAGS.pacf_logging_delay_milliseconds_through_ybfe_tv": 30000,
  1003. "EXPERIMENT_FLAGS.pageid_as_header_web": true,
  1004. "EXPERIMENT_FLAGS.pause_ad_video_on_desktop_engagement_panel_click": true,
  1005. "EXPERIMENT_FLAGS.pbj_navigate_limit": -1,
  1006. "EXPERIMENT_FLAGS.pdg_enable_flow_logging_for_super_chat": true,
  1007. "EXPERIMENT_FLAGS.pdg_enable_flow_logging_for_super_stickers": true,
  1008. "EXPERIMENT_FLAGS.play_ping_interval_ms": 300000,
  1009. "EXPERIMENT_FLAGS.player_allow_autonav_after_playlist": true,
  1010. "EXPERIMENT_FLAGS.player_bootstrap_method": true,
  1011. "EXPERIMENT_FLAGS.player_doubletap_to_seek": true,
  1012. "EXPERIMENT_FLAGS.player_enable_playback_playlist_change": true,
  1013. "EXPERIMENT_FLAGS.player_endscreen_ellipsis_fix": true,
  1014. "EXPERIMENT_FLAGS.polymer_bad_build_labels": true,
  1015. "EXPERIMENT_FLAGS.polymer_log_prop_change_observer_percent": 0,
  1016. "EXPERIMENT_FLAGS.polymer_task_manager_proxied_promise": true,
  1017. "EXPERIMENT_FLAGS.polymer_task_manager_status": "production",
  1018. "EXPERIMENT_FLAGS.polymer_verifiy_app_state": true,
  1019. "EXPERIMENT_FLAGS.polymer_video_renderer_defer_menu": true,
  1020. "EXPERIMENT_FLAGS.polymer_warm_thumbnail_preload": true,
  1021. "EXPERIMENT_FLAGS.polymer_ytdi_enable_global_injector": true,
  1022. "EXPERIMENT_FLAGS.post_type_icons_rearrange": 1,
  1023. "EXPERIMENT_FLAGS.prefetch_comments_ms_after_video": 0,
  1024. "EXPERIMENT_FLAGS.prefetch_coordinator_command_timeout_ms": 60000,
  1025. "EXPERIMENT_FLAGS.prefetch_coordinator_error_logging_sampling_rate": 1,
  1026. "EXPERIMENT_FLAGS.prefetch_coordinator_max_inflight_requests": 1,
  1027. "EXPERIMENT_FLAGS.problem_walkthrough_sd": true,
  1028. "EXPERIMENT_FLAGS.qoe_send_and_write": true,
  1029. "EXPERIMENT_FLAGS.record_app_crashed_web": true,
  1030. "EXPERIMENT_FLAGS.reload_without_polymer_innertube": true,
  1031. "EXPERIMENT_FLAGS.rich_grid_true_inline_playback_trigger_delay": 0,
  1032. "EXPERIMENT_FLAGS.rich_grid_watch_meta_side": true,
  1033. "EXPERIMENT_FLAGS.rich_grid_watch_open_animation_duration": 0,
  1034. "EXPERIMENT_FLAGS.rich_grid_watch_show_watch_next": true,
  1035. "EXPERIMENT_FLAGS.scheduler_use_raf_by_default": true,
  1036. "EXPERIMENT_FLAGS.search_ui_enable_pve_buy_button": true,
  1037. "EXPERIMENT_FLAGS.search_ui_official_cards_enable_paid_virtual_event_buy_button": true,
  1038. "EXPERIMENT_FLAGS.searchbox_reporting": true,
  1039. "EXPERIMENT_FLAGS.send_config_hash_timer": 0,
  1040. "EXPERIMENT_FLAGS.serve_pdp_at_canonical_url": true,
  1041. "EXPERIMENT_FLAGS.service_worker_enabled": true,
  1042. "EXPERIMENT_FLAGS.service_worker_push_enabled": true,
  1043. "EXPERIMENT_FLAGS.service_worker_push_force_notification_prompt_tag": "1",
  1044. "EXPERIMENT_FLAGS.service_worker_push_home_page_prompt": true,
  1045. "EXPERIMENT_FLAGS.service_worker_push_logged_out_prompt_watches": -1,
  1046. "EXPERIMENT_FLAGS.service_worker_push_prompt_cap": -1,
  1047. "EXPERIMENT_FLAGS.service_worker_push_prompt_delay_microseconds": 3888000000000,
  1048. "EXPERIMENT_FLAGS.service_worker_push_watch_page_prompt": true,
  1049. "EXPERIMENT_FLAGS.service_worker_scope": "/",
  1050. "EXPERIMENT_FLAGS.service_worker_subscribe_with_vapid_key": true,
  1051. "EXPERIMENT_FLAGS.shorts_desktop_watch_while_p2": true,
  1052. "EXPERIMENT_FLAGS.shorts_enable_snap_stop": true,
  1053. "EXPERIMENT_FLAGS.shorts_inline_player_triggering_delay": 500,
  1054. "EXPERIMENT_FLAGS.shorts_profile_header_c3po": true,
  1055. "EXPERIMENT_FLAGS.should_clear_video_data_on_player_cued_unstarted": true,
  1056. "EXPERIMENT_FLAGS.show_civ_reminder_on_web": true,
  1057. "EXPERIMENT_FLAGS.skip_invalid_ytcsi_ticks": true,
  1058. "EXPERIMENT_FLAGS.skip_ls_gel_retry": true,
  1059. "EXPERIMENT_FLAGS.skip_setting_info_in_csi_data_object": true,
  1060. "EXPERIMENT_FLAGS.slow_compressions_before_abandon_count": 4,
  1061. "EXPERIMENT_FLAGS.sponsorships_gifting_enable_opt_in": true,
  1062. "EXPERIMENT_FLAGS.super_sticker_emoji_picker_category_button_icon_filled": true,
  1063. "EXPERIMENT_FLAGS.suppress_error_204_logging": true,
  1064. "EXPERIMENT_FLAGS.track_webfe_innertube_auth_mismatch": true,
  1065. "EXPERIMENT_FLAGS.transport_use_scheduler": true,
  1066. "EXPERIMENT_FLAGS.tv_pacf_logging_sample_rate": 0.01,
  1067. "EXPERIMENT_FLAGS.use_ads_engagement_panel_desktop_footer_cta": true,
  1068. "EXPERIMENT_FLAGS.use_better_post_dismissals": true,
  1069. "EXPERIMENT_FLAGS.use_border_and_grid_wrapping_on_desktop_panel_tiles": true,
  1070. "EXPERIMENT_FLAGS.use_new_cml": true,
  1071. "EXPERIMENT_FLAGS.use_new_in_memory_storage": true,
  1072. "EXPERIMENT_FLAGS.use_new_nwl_initialization": true,
  1073. "EXPERIMENT_FLAGS.use_new_nwl_saw": true,
  1074. "EXPERIMENT_FLAGS.use_new_nwl_stw": true,
  1075. "EXPERIMENT_FLAGS.use_new_nwl_wts": true,
  1076. "EXPERIMENT_FLAGS.use_player_abuse_bg_library": true,
  1077. "EXPERIMENT_FLAGS.use_profilepage_event_label_in_carousel_playbacks": true,
  1078. "EXPERIMENT_FLAGS.use_request_time_ms_header": true,
  1079. "EXPERIMENT_FLAGS.use_session_based_sampling": true,
  1080. "EXPERIMENT_FLAGS.use_source_element_if_present_for_actions": true,
  1081. "EXPERIMENT_FLAGS.use_ts_visibilitylogger": true,
  1082. "EXPERIMENT_FLAGS.use_watch_fragments2": true,
  1083. "EXPERIMENT_FLAGS.user_engagement_experiments_rate_limit_ms": 86400000,
  1084. "EXPERIMENT_FLAGS.user_mention_suggestions_edu_impression_cap": 10,
  1085. "EXPERIMENT_FLAGS.verify_ads_itag_early": true,
  1086. "EXPERIMENT_FLAGS.visibility_time_between_jobs_ms": 100,
  1087. "EXPERIMENT_FLAGS.vss_final_ping_send_and_write": true,
  1088. "EXPERIMENT_FLAGS.vss_playback_use_send_and_write": true,
  1089. "EXPERIMENT_FLAGS.warm_load_nav_start_web": true,
  1090. "EXPERIMENT_FLAGS.warm_op_csn_cleanup": true,
  1091. "EXPERIMENT_FLAGS.watch_next_pause_autoplay_lact_sec": 4500,
  1092. "EXPERIMENT_FLAGS.web_always_load_chat_support": true,
  1093. "EXPERIMENT_FLAGS.web_amsterdam_playlists": true,
  1094. "EXPERIMENT_FLAGS.web_amsterdam_post_mvp_playlists": true,
  1095. "EXPERIMENT_FLAGS.web_animated_like": true,
  1096. "EXPERIMENT_FLAGS.web_animated_like_lazy_load": true,
  1097. "EXPERIMENT_FLAGS.web_api_url": true,
  1098. "EXPERIMENT_FLAGS.web_appshell_purge_trigger": true,
  1099. "EXPERIMENT_FLAGS.web_appshell_refresh_trigger": true,
  1100. "EXPERIMENT_FLAGS.web_autonav_allow_off_by_default": true,
  1101. "EXPERIMENT_FLAGS.web_button_rework": true,
  1102. "EXPERIMENT_FLAGS.web_cinematic_masthead": true,
  1103. "EXPERIMENT_FLAGS.web_darker_dark_theme": true,
  1104. "EXPERIMENT_FLAGS.web_darker_dark_theme_deprecate": true,
  1105. "EXPERIMENT_FLAGS.web_darker_dark_theme_live_chat": true,
  1106. "EXPERIMENT_FLAGS.web_dedupe_ve_grafting": true,
  1107. "EXPERIMENT_FLAGS.web_defer_shorts_ui": true,
  1108. "EXPERIMENT_FLAGS.web_defer_shorts_ui_phase2": true,
  1109. "EXPERIMENT_FLAGS.web_deprecate_service_ajax_map_dependency": true,
  1110. "EXPERIMENT_FLAGS.web_emulated_idle_callback_delay": 0,
  1111. "EXPERIMENT_FLAGS.web_enable_error_204": true,
  1112. "EXPERIMENT_FLAGS.web_enable_history_cache_map": true,
  1113. "EXPERIMENT_FLAGS.web_enable_video_preview_migration": true,
  1114. "EXPERIMENT_FLAGS.web_enable_voz_audio_feedback": true,
  1115. "EXPERIMENT_FLAGS.web_engagement_panel_show_description": true,
  1116. "EXPERIMENT_FLAGS.web_ep_chevron_tap_target_size": true,
  1117. "EXPERIMENT_FLAGS.web_filled_subscribed_button": true,
  1118. "EXPERIMENT_FLAGS.web_foreground_heartbeat_interval_ms": 28000,
  1119. "EXPERIMENT_FLAGS.web_forward_command_on_pbj": true,
  1120. "EXPERIMENT_FLAGS.web_gel_debounce_ms": 60000,
  1121. "EXPERIMENT_FLAGS.web_gel_timeout_cap": true,
  1122. "EXPERIMENT_FLAGS.web_guide_ui_refresh": true,
  1123. "EXPERIMENT_FLAGS.web_hide_autonav_headline": true,
  1124. "EXPERIMENT_FLAGS.web_hide_autonav_keyline": true,
  1125. "EXPERIMENT_FLAGS.web_home_feed_reload_delay": 1440,
  1126. "EXPERIMENT_FLAGS.web_home_feed_reload_experience": "none",
  1127. "EXPERIMENT_FLAGS.web_imp_thumbnail_click_fix_enabled": true,
  1128. "EXPERIMENT_FLAGS.web_inline_player_enabled": true,
  1129. "EXPERIMENT_FLAGS.web_inline_player_no_playback_ui_click_handler": true,
  1130. "EXPERIMENT_FLAGS.web_inline_player_triggering_delay": 1000,
  1131. "EXPERIMENT_FLAGS.web_kevlar_enable_adaptive_signals": true,
  1132. "EXPERIMENT_FLAGS.web_log_memory_total_kbytes": true,
  1133. "EXPERIMENT_FLAGS.web_log_player_watch_next_ticks": true,
  1134. "EXPERIMENT_FLAGS.web_log_reels_ticks": true,
  1135. "EXPERIMENT_FLAGS.web_logging_max_batch": 150,
  1136. "EXPERIMENT_FLAGS.web_modern_ads": true,
  1137. "EXPERIMENT_FLAGS.web_modern_buttons": true,
  1138. "EXPERIMENT_FLAGS.web_modern_buttons_bl_survey": true,
  1139. "EXPERIMENT_FLAGS.web_modern_chips": true,
  1140. "EXPERIMENT_FLAGS.web_modern_dialogs": true,
  1141. "EXPERIMENT_FLAGS.web_modern_playlists": true,
  1142. "EXPERIMENT_FLAGS.web_modern_subscribe": true,
  1143. "EXPERIMENT_FLAGS.web_modern_subscribe_style": "filled",
  1144. "EXPERIMENT_FLAGS.web_move_autoplay_video_under_chip": true,
  1145. "EXPERIMENT_FLAGS.web_moved_super_title_link": true,
  1146. "EXPERIMENT_FLAGS.web_one_platform_error_handling": true,
  1147. "EXPERIMENT_FLAGS.web_paused_only_miniplayer_shortcut_expand": true,
  1148. "EXPERIMENT_FLAGS.web_player_add_ve_conversion_logging_to_outbound_links": true,
  1149. "EXPERIMENT_FLAGS.web_player_autonav_empty_suggestions_fix": true,
  1150. "EXPERIMENT_FLAGS.web_player_autonav_toggle_always_listen": true,
  1151. "EXPERIMENT_FLAGS.web_player_autonav_use_server_provided_state": true,
  1152. // "EXPERIMENT_FLAGS.web_player_caption_language_preference_stickiness_duration": 15,
  1153. "EXPERIMENT_FLAGS.web_player_decouple_autonav": true,
  1154. "EXPERIMENT_FLAGS.web_player_disable_inline_scrubbing": true,
  1155. "EXPERIMENT_FLAGS.web_player_enable_early_warning_snackbar": true,
  1156. "EXPERIMENT_FLAGS.web_player_enable_featured_product_banner_on_desktop": true,
  1157. "EXPERIMENT_FLAGS.web_player_enable_ipp": true,
  1158. "EXPERIMENT_FLAGS.web_player_enable_premium_hbr_in_h5_api": true,
  1159. "EXPERIMENT_FLAGS.web_player_enable_premium_hbr_playback_cap": true,
  1160. "EXPERIMENT_FLAGS.web_player_entities_middleware": true,
  1161. "EXPERIMENT_FLAGS.web_player_log_click_before_generating_ve_conversion_params": true,
  1162. "EXPERIMENT_FLAGS.web_player_move_autonav_toggle": true,
  1163. "EXPERIMENT_FLAGS.web_player_mutable_event_label": true,
  1164. "EXPERIMENT_FLAGS.web_player_should_honor_include_asr_setting": true,
  1165. "EXPERIMENT_FLAGS.web_player_small_hbp_settings_menu": true,
  1166. "EXPERIMENT_FLAGS.web_player_topify_subtitles_for_shorts": true,
  1167. "EXPERIMENT_FLAGS.web_player_touch_mode_improvements": true,
  1168. "EXPERIMENT_FLAGS.web_player_use_new_api_for_quality_pullback": true,
  1169. "EXPERIMENT_FLAGS.web_player_ve_conversion_fixes_for_channel_info": true,
  1170. "EXPERIMENT_FLAGS.web_player_watch_next_response": true,
  1171. "EXPERIMENT_FLAGS.web_prefetch_preload_video": true,
  1172. "EXPERIMENT_FLAGS.web_prs_testing_mode_killswitch": true,
  1173. "EXPERIMENT_FLAGS.web_replace_thumbnail_with_image": true,
  1174. "EXPERIMENT_FLAGS.web_rounded_thumbnails": true,
  1175. "EXPERIMENT_FLAGS.web_search_inline_playback_mouse_enter": true,
  1176. "EXPERIMENT_FLAGS.web_search_inline_player_triggering_delay": 500,
  1177. "EXPERIMENT_FLAGS.web_search_shorts_inline_playback_duration_ms": 0,
  1178. "EXPERIMENT_FLAGS.web_segmented_like_dislike_button": true,
  1179. "EXPERIMENT_FLAGS.web_set_inline_preview_setting_in_home_browse_request": true,
  1180. "EXPERIMENT_FLAGS.web_sheets_ui_refresh": true,
  1181. "EXPERIMENT_FLAGS.web_shorts_early_player_load": true,
  1182. "EXPERIMENT_FLAGS.web_shorts_error_logging_threshold": 0.001,
  1183. "EXPERIMENT_FLAGS.web_shorts_expanded_overlay_type": "DEFAULT",
  1184. "EXPERIMENT_FLAGS.web_shorts_inline_playback_preview_ms": 0,
  1185. "EXPERIMENT_FLAGS.web_shorts_intersection_observer_threshold_override": 0,
  1186. "EXPERIMENT_FLAGS.web_shorts_nvc_dark": true,
  1187. "EXPERIMENT_FLAGS.web_shorts_overlay_vertical_orientation": "bottom",
  1188. "EXPERIMENT_FLAGS.web_shorts_progress_bar": true,
  1189. "EXPERIMENT_FLAGS.web_shorts_scrubber_threshold_sec": 0,
  1190. "EXPERIMENT_FLAGS.web_shorts_shelf_fixed_position": 9,
  1191. "EXPERIMENT_FLAGS.web_shorts_shelf_on_search": true,
  1192. "EXPERIMENT_FLAGS.web_shorts_skip_loading_same_index": true,
  1193. "EXPERIMENT_FLAGS.web_shorts_storyboard_threshold_seconds": 0,
  1194. "EXPERIMENT_FLAGS.web_smoothness_test_duration_ms": 0,
  1195. "EXPERIMENT_FLAGS.web_smoothness_test_method": 0,
  1196. "EXPERIMENT_FLAGS.web_snackbar_ui_refresh": true,
  1197. "EXPERIMENT_FLAGS.web_structured_description_show_more": true,
  1198. "EXPERIMENT_FLAGS.web_suggestion_box_restyle": true,
  1199. "EXPERIMENT_FLAGS.web_system_health_fraction": 0.01,
  1200. "EXPERIMENT_FLAGS.web_turn_off_imp_on_thumbnail_mousedown": true,
  1201. "EXPERIMENT_FLAGS.web_use_cache_for_image_fallback": true,
  1202. "EXPERIMENT_FLAGS.web_yt_config_context": true,
  1203. "EXPERIMENT_FLAGS.woffle_clean_up_after_entity_migration": true,
  1204. "EXPERIMENT_FLAGS.woffle_enable_download_status": true,
  1205. "EXPERIMENT_FLAGS.woffle_orchestration": true,
  1206. "EXPERIMENT_FLAGS.woffle_playlist_optimization": true,
  1207. "EXPERIMENT_FLAGS.woffle_undo_delete": true,
  1208. "EXPERIMENT_FLAGS.yoodle_base_url": "",
  1209. "EXPERIMENT_FLAGS.yoodle_end_time_utc": 0,
  1210. "EXPERIMENT_FLAGS.yoodle_start_time_utc": 0,
  1211. "EXPERIMENT_FLAGS.yoodle_webp_base_url": "",
  1212. "EXPERIMENT_FLAGS.your_data_entrypoint": true,
  1213. "EXPERIMENT_FLAGS.yt_network_manager_component_to_lib_killswitch": true,
  1214. "EXPERIMENT_FLAGS.ytidb_clear_embedded_player": true,
  1215. "EXPERIMENT_FLAGS.ytidb_fetch_datasync_ids_for_data_cleanup": true,
  1216. "EXPERIMENT_FLAGS.ytidb_remake_db_retries": 3,
  1217. "EXPERIMENT_FLAGS.ytidb_reopen_db_retries": 3,
  1218. "EXPERIMENT_FLAGS.ytidb_transaction_ended_event_rate_limit": 0.02,
  1219. "EXPERIMENT_FLAGS.ytidb_transaction_ended_event_rate_limit_session": 0.2,
  1220. "EXPERIMENT_FLAGS.ytidb_transaction_ended_event_rate_limit_transaction": 0.1,
  1221. "FEXP_EXPERIMENTS.0": 23983296,
  1222. // "FEXP_EXPERIMENTS.1": 23986031,
  1223. "FEXP_EXPERIMENTS.10": 24433679,
  1224. "FEXP_EXPERIMENTS.11": 24437577,
  1225. "FEXP_EXPERIMENTS.12": 24439361,
  1226. // "FEXP_EXPERIMENTS.13": 24449113,
  1227. // "FEXP_EXPERIMENTS.14": 24453783,
  1228. "FEXP_EXPERIMENTS.15": 24468691,
  1229. // "FEXP_EXPERIMENTS.16": 24470719,
  1230. // "FEXP_EXPERIMENTS.17": 24499116,
  1231. // "FEXP_EXPERIMENTS.18": 24499792,
  1232. // "FEXP_EXPERIMENTS.19": 24512415,
  1233. "FEXP_EXPERIMENTS.2": 24004644,
  1234. // "FEXP_EXPERIMENTS.20": 24514873,
  1235. "FEXP_EXPERIMENTS.21": 24516157,
  1236. "FEXP_EXPERIMENTS.22": 24550458,
  1237. "FEXP_EXPERIMENTS.23": 24558190,
  1238. "FEXP_EXPERIMENTS.24": 24559764,
  1239. "FEXP_EXPERIMENTS.25": 24693103,
  1240. "FEXP_EXPERIMENTS.26": 39323074,
  1241. "FEXP_EXPERIMENTS.3": 24007246,
  1242. "FEXP_EXPERIMENTS.4": 24080738,
  1243. "FEXP_EXPERIMENTS.5": 24135310,
  1244. // "FEXP_EXPERIMENTS.6": 24219381,
  1245. // "FEXP_EXPERIMENTS.7": 24255163,
  1246. // "FEXP_EXPERIMENTS.8": 24406084,
  1247. // "FEXP_EXPERIMENTS.9": 24415864,
  1248. "FILLER_DATA.browse.filler": true,
  1249. "FILLER_DATA.browse.page": "browse",
  1250. "FILLER_DATA.search.filler": true,
  1251. "FILLER_DATA.search.page": "search",
  1252. "FILLER_DATA.watch.filler": true,
  1253. "FILLER_DATA.watch.page": "watch",
  1254. "FILLER_DATA.watch.playerResponse.playabilityStatus.status": "OK",
  1255. // "GAPI_LOCALE": "en_US",
  1256. // "GL": "JP",
  1257. // "GOOGLE_FEEDBACK_PRODUCT_DATA.accept_language": "en-US,en;q=0.9",
  1258. "GOOGLE_FEEDBACK_PRODUCT_DATA.polymer": "active",
  1259. "GOOGLE_FEEDBACK_PRODUCT_DATA.polymer2": "active",
  1260. // "HL": "en",
  1261. "HTML_DIR": "ltr",
  1262. // "HTML_LANG": "en",
  1263. "INNERTUBE_API_VERSION": "v1",
  1264. "INNERTUBE_CONTEXT.request.useSsl": true,
  1265. "INNERTUBE_CONTEXT.user.lockedSafetyMode": false,
  1266. // "INNERTUBE_CONTEXT_GL": "JP",
  1267. // "INNERTUBE_CONTEXT_HL": "en",
  1268. "IS_TABLET": false,
  1269. "IS_WATCH_PAGE_COLD": true,
  1270. "LIVE_CHAT_BASE_TANGO_CONFIG.channelUri": "https://client-channel.google.com/client-channel/client",
  1271. "LIVE_CHAT_BASE_TANGO_CONFIG.clientName": "yt-live-comments",
  1272. // "LIVE_CHAT_BASE_TANGO_CONFIG.requiresAuthToken": true,
  1273. "LIVE_CHAT_BASE_TANGO_CONFIG.senderUri": "https://clients4.google.com/invalidation/lcs/client",
  1274. "LIVE_CHAT_BASE_TANGO_CONFIG.useNewTango": true,
  1275. "LIVE_CHAT_SEND_MESSAGE_ACTION": "live_chat/watch_page/send",
  1276. // "LOGGED_IN": false,
  1277. "MENTIONS_EDU_HELP_LINK": "https://support.google.com/youtube/?p=creator_community",
  1278. "NON_DEFERRED_HORIZONTAL_LIST_ITEM_COUNT": 5,
  1279. "NON_DEFERRED_HORIZONTAL_LIST_ROW_COUNT": 0,
  1280. "NO_EMPTY_DATA_IMG": true,
  1281. "NUM_NAV": 0,
  1282. "PAGE_BUILD_LABEL": "youtube.desktop.web_20230502_04_RC00",
  1283. "PAGE_CL": 528763904,
  1284. "RAW_COLD_CONFIG_GROUP.experimentFlags.45352180.booleanFlagValue": true,
  1285. "RAW_COLD_CONFIG_GROUP.experimentFlags.45353397.booleanFlagValue": true,
  1286. "RAW_COLD_CONFIG_GROUP.experimentFlags.45358145.booleanFlagValue": true,
  1287. "RAW_COLD_CONFIG_GROUP.experimentFlags.45364993.booleanFlagValue": true,
  1288. "RAW_COLD_CONFIG_GROUP.experimentFlags.45366266.intFlagValue": 60000,
  1289. "RAW_COLD_CONFIG_GROUP.experimentFlags.45366267.intFlagValue": 1,
  1290. "RAW_COLD_CONFIG_GROUP.experimentFlags.45366268.doubleFlagValue": 1,
  1291. "RAW_COLD_CONFIG_GROUP.experimentFlags.45367987.booleanFlagValue": true,
  1292. "RAW_COLD_CONFIG_GROUP.experimentFlags.45368386.booleanFlagValue": true,
  1293. "RAW_COLD_CONFIG_GROUP.experimentFlags.45368498.booleanFlagValue": true,
  1294. "RAW_COLD_CONFIG_GROUP.experimentFlags.45368787.intFlagValue": 200,
  1295. "RAW_COLD_CONFIG_GROUP.experimentFlags.45370961.booleanFlagValue": true,
  1296. "RAW_COLD_CONFIG_GROUP.experimentFlags.45372814.booleanFlagValue": true,
  1297. "RAW_COLD_CONFIG_GROUP.experimentFlags.45374306.booleanFlagValue": true,
  1298. "RAW_COLD_CONFIG_GROUP.experimentFlags.45374860.booleanFlagValue": true,
  1299. "RAW_COLD_CONFIG_GROUP.experimentFlags.45375564.booleanFlagValue": true,
  1300. "RAW_COLD_CONFIG_GROUP.experimentFlags.45375565.booleanFlagValue": true,
  1301. "RAW_COLD_CONFIG_GROUP.experimentFlags.45379855.booleanFlagValue": true,
  1302. "RAW_COLD_CONFIG_GROUP.experimentFlags.45388742.booleanFlagValue": true,
  1303. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.androidEnablePip": false,
  1304. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.androidNgwUiEnabled": false,
  1305. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.androidRestoreBrowseContentsFromBackStack": false,
  1306. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.androidThumbnailMonitorCount": 0,
  1307. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.androidThumbnailMonitorEnabled": false,
  1308. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.androidThumbnailMonitorMinimumWidth": 0,
  1309. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.enableDetailedNetworkStatusReporting": false,
  1310. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.enableGhostCards": false,
  1311. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.enableInlineMuted": false,
  1312. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.enableMobileAutoOffline": false,
  1313. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.hourToReportNetworkStatus": 0,
  1314. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.iosEnableDynamicFontSizing": false,
  1315. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.iosSearchviewRefactoryEnabled": false,
  1316. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.iosSsoSafariFsiPromoEnabled": true,
  1317. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.iosTodayWidgetEnabled": false,
  1318. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.iosWatchExpandTransitionWithoutSnapshot": false,
  1319. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.networkStatusReportingWindowSecs": 0,
  1320. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.ngwFlexyEnabled": false,
  1321. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.ngwFlexyMaxCropRatio": 1,
  1322. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.postsV2": false,
  1323. "RAW_COLD_CONFIG_GROUP.mainAppColdConfig.searchHintExp": "search_youtube",
  1324. "RAW_HOT_CONFIG_GROUP.experimentFlags.45353338.booleanFlagValue": true,
  1325. "RAW_HOT_CONFIG_GROUP.experimentFlags.45355378.booleanFlagValue": true,
  1326. "RAW_HOT_CONFIG_GROUP.experimentFlags.45356954.booleanFlagValue": true,
  1327. "RAW_HOT_CONFIG_GROUP.experimentFlags.45356979.booleanFlagValue": true,
  1328. "RAW_HOT_CONFIG_GROUP.experimentFlags.45362297.booleanFlagValue": true,
  1329. "RAW_HOT_CONFIG_GROUP.experimentFlags.45365137.booleanFlagValue": true,
  1330. "RAW_HOT_CONFIG_GROUP.experimentFlags.45365843.booleanFlagValue": true,
  1331. "RAW_HOT_CONFIG_GROUP.experimentFlags.45366943.booleanFlagValue": true,
  1332. "RAW_HOT_CONFIG_GROUP.experimentFlags.45367289.doubleFlagValue": 2,
  1333. "RAW_HOT_CONFIG_GROUP.experimentFlags.45369552.booleanFlagValue": true,
  1334. "RAW_HOT_CONFIG_GROUP.experimentFlags.45371287.booleanFlagValue": true,
  1335. "RAW_HOT_CONFIG_GROUP.experimentFlags.45375292.booleanFlagValue": true,
  1336. "RAW_HOT_CONFIG_GROUP.experimentFlags.45375445.booleanFlagValue": true,
  1337. "RAW_HOT_CONFIG_GROUP.experimentFlags.45377081.booleanFlagValue": true,
  1338. "RAW_HOT_CONFIG_GROUP.experimentFlags.45377737.booleanFlagValue": true,
  1339. "RAW_HOT_CONFIG_GROUP.experimentFlags.45379169.booleanFlagValue": true,
  1340. "RAW_HOT_CONFIG_GROUP.experimentFlags.45382142.booleanFlagValue": true,
  1341. "RAW_HOT_CONFIG_GROUP.experimentFlags.45382537.booleanFlagValue": true,
  1342. "RAW_HOT_CONFIG_GROUP.experimentFlags.45389043.booleanFlagValue": true,
  1343. "RAW_HOT_CONFIG_GROUP.experimentFlags.45390547.booleanFlagValue": true,
  1344. "RAW_HOT_CONFIG_GROUP.experimentFlags.45399984.booleanFlagValue": true,
  1345. "RAW_HOT_CONFIG_GROUP.loggingHotConfig.eventLoggingConfig.enabled": true,
  1346. "RAW_HOT_CONFIG_GROUP.loggingHotConfig.eventLoggingConfig.maxAgeHours": 720,
  1347. "RAW_HOT_CONFIG_GROUP.loggingHotConfig.eventLoggingConfig.requestRetryEnabled": true,
  1348. "RAW_HOT_CONFIG_GROUP.loggingHotConfig.eventLoggingConfig.retryConfig.fixedBatchRetryEnabled": false,
  1349. "RAW_HOT_CONFIG_GROUP.loggingHotConfig.eventLoggingConfig.shouldForceSetAllPayloadsToImmediateTier": false,
  1350. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.exposeConfigRefreshSetting": false,
  1351. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosEarlySetWatchTransition": false,
  1352. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosEnableSearchButtonOnPlayerOverlay": false,
  1353. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosFreshFullRefresh": false,
  1354. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosFreshHomeIntervalSecs": 0,
  1355. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosFreshNotificationsInboxIntervalSecs": 0,
  1356. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosFreshSubscriptionsIntervalSecs": 0,
  1357. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosMinimumTooltipDurationMsecs": 1000,
  1358. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosTodayWidgetRefreshIntervalSecs": 28800,
  1359. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.iosWatchExpandTransition": false,
  1360. "RAW_HOT_CONFIG_GROUP.mainAppHotConfig.signedOutNotificationsIosPrompt": true,
  1361. "REMAINING_DOVA_DEFERRED_CHUNKS": 6,
  1362. "REUSE_COMPONENTS": true,
  1363. "ROOT_VE_TYPE": 3832,
  1364. // "SBOX_LABELS.SUGGESTION_DISMISSED_LABEL": "Suggestion removed",
  1365. // "SBOX_LABELS.SUGGESTION_DISMISS_LABEL": "Remove",
  1366. "SBOX_SETTINGS.ENABLE_DELETE_ICON": false,
  1367. "SBOX_SETTINGS.ENABLE_DELETE_ICON_HOVER": false,
  1368. "SBOX_SETTINGS.HAS_ON_SCREEN_KEYBOARD": false,
  1369. "SBOX_SETTINGS.HIDE_REMOVE_LINK": false,
  1370. "SBOX_SETTINGS.IS_FUSION": false,
  1371. "SBOX_SETTINGS.IS_POLYMER": true,
  1372. // "SBOX_SETTINGS.REQUEST_LANGUAGE": "en",
  1373. // "SBOX_SETTINGS.SBOX_STRINGS.SBOX_REPORT_SUGGESTIONS": "Report search predictions",
  1374. "SBOX_SETTINGS.SEARCHBOX_BEHAVIOR_EXPERIMENT": "zero-prefix",
  1375. "SBOX_SETTINGS.SEARCHBOX_ENABLE_REFINEMENT_SUGGEST": true,
  1376. "SBOX_SETTINGS.SEARCHBOX_REPORTING": true,
  1377. "SBOX_SETTINGS.SEARCHBOX_TAP_TARGET_EXPERIMENT": 0,
  1378. "SBOX_SETTINGS.SEARCHBOX_ZERO_TYPING_SUGGEST_USE_REGULAR_SUGGEST": "always",
  1379. // "SBOX_SETTINGS.SUGGESTION_BOX_RESTYLE": true,
  1380. "SBOX_SETTINGS.SUGGESTION_BOX_RESTYLE_BOLDER": false,
  1381. "SCHEDULED_LAZY_LIST": true,
  1382. "SERVER_NAME": "WebFE",
  1383. "SERVER_VERSION": "prod",
  1384. "SERVICE_WORKER_PROMPT_NOTIFICATIONS": true,
  1385. "STAMPER_STABLE_LIST": true,
  1386. "START_IN_FULL_WINDOW_MODE": false,
  1387. "START_IN_THEATER_MODE": false,
  1388. "STS": 19478,
  1389. // "TIME_CREATED_MS": 1683185951488,
  1390. "TIMING_ACTION": "watch",
  1391. "TIMING_AFT_KEYS.0": "pbs",
  1392. "TIMING_AFT_KEYS.1": "pbp",
  1393. "TIMING_AFT_KEYS.2": "pbu",
  1394. "TIMING_INFO.yt_ad": "1",
  1395. "VISIBILITY_TIME_BETWEEN_JOBS_MS": 100,
  1396. "XSRF_FIELD_NAME": "session_token",
  1397. // "initialBodyClientWidth": 1464,
  1398. // "initialInnerHeight": 765,
  1399. // "initialInnerWidth": 1464,
  1400. "networkless_performanceTIMING_ACTION": "networkless_performance",
  1401. "player_attTIMING_ACTION": "player_att",
  1402. "scheduler.timeout": 20,
  1403. "scheduler.useRaf": true,
  1404. "wn_commentsTIMING_ACTION": "wn_comments"
  1405. }
  1406. ;
  1407. function createConfigEditor(container, entries) {
  1408.  
  1409. const buildEntry = (key, value) => {
  1410. const entry = document.createElement('div');
  1411. entry.classList.add('list-entry');
  1412. let displayValue = typeof value !== 'string' ? value + "" : `"${value}"`;
  1413.  
  1414. const keySpan = document.createElement('span');
  1415. keySpan.className = 'key';
  1416. keySpan.setAttribute('title', key)
  1417. const keyDiv = document.createElement('div');
  1418. keyDiv.textContent = `${key}`;
  1419. keySpan.appendChild(keyDiv);
  1420.  
  1421. const valueSpan = document.createElement('span');
  1422. valueSpan.className = 'value';
  1423. valueSpan.setAttribute('title', displayValue)
  1424. const valueDiv = document.createElement('div');
  1425. valueDiv.textContent = displayValue;
  1426. valueSpan.appendChild(valueDiv);
  1427.  
  1428. const valueInput = document.createElement('input');
  1429. valueInput.className = 'value';
  1430. valueInput.type = 'text';
  1431. valueInput.value = displayValue;
  1432.  
  1433. entry.appendChild(keySpan);
  1434. entry.appendChild(valueSpan);
  1435. valueSpan.appendChild(valueInput);
  1436.  
  1437. if (mainKeys.includes(key)) entry.classList.add('list-entry-mainkey');
  1438. if (key in minorKeyValues) {
  1439. if (minorKeyValues[key] === value) entry.classList.add('list-entry-minorkey-same');
  1440. else entry.classList.add('list-entry-minorkey-diff');
  1441. }
  1442.  
  1443. return entry;
  1444. };
  1445.  
  1446. for (const key of sortEntryKeys(Object.keys(entries))) {
  1447. const entry = buildEntry(key, entries[key]);
  1448. container.appendChild(entry);
  1449. }
  1450.  
  1451. function ensureElementIsInView(el) {
  1452. const rect = el.getBoundingClientRect();
  1453. const scrollable = findScrollableElement(el);
  1454. const viewHeight = scrollable.clientHeight;
  1455.  
  1456. if (rect.top < 0) el.scrollIntoView(true);
  1457. else if (rect.bottom > viewHeight) el.scrollIntoView(false);
  1458. }
  1459.  
  1460. function findScrollableElement(el) {
  1461. let p = el.parentNode;
  1462. while (p) {
  1463. if (p.scrollHeight > p.clientHeight) return p;
  1464. p = p.parentNode;
  1465. }
  1466. return document.documentElement;
  1467. }
  1468.  
  1469.  
  1470.  
  1471. let lastSelectedEntry = null;
  1472. let selectedEntries = [];
  1473. const toggleEntrySelection = (entry) => {
  1474. let beforeSelected = entry.classList.contains('selected');
  1475. let afterSelected = !beforeSelected;
  1476. if (!beforeSelected) {
  1477. if (entry.matches('.list-hide-minor-same .list-entry.list-entry-minorkey-same')) {
  1478. return;
  1479. }
  1480. }
  1481. entry.classList.toggle('selected');
  1482. if (afterSelected) {
  1483. lastSelectedEntry = entry;
  1484. ensureElementIsInView(entry);
  1485. }
  1486. let left = 0;
  1487. let right = selectedEntries.length - 1;
  1488. let insertIndex = selectedEntries.length;
  1489. while (left <= right) {
  1490. const mid = Math.floor((left + right) / 2);
  1491. if (entry.compareDocumentPosition(selectedEntries[mid]) & Node.DOCUMENT_POSITION_FOLLOWING) {
  1492. insertIndex = mid;
  1493. right = mid - 1;
  1494. } else {
  1495. left = mid + 1;
  1496. }
  1497. }
  1498. if (insertIndex === selectedEntries.length) {
  1499. selectedEntries.push(entry);
  1500. } else {
  1501. selectedEntries.splice(insertIndex, 0, entry);
  1502. }
  1503. };
  1504.  
  1505. const editEntries = (entries) => {
  1506. entries.forEach((entry) => {
  1507. // entry.classList.add('editing');
  1508. const input = entry.querySelector('input.value');
  1509. if (input) {
  1510. input.focus();
  1511. input.select();
  1512. }
  1513. });
  1514. };
  1515.  
  1516.  
  1517.  
  1518. let firstSelectedEntry = null;
  1519.  
  1520. function selectEntriesBetween(entry1, entry2) {
  1521. let startSelection = false;
  1522. let entries = Array.from(container.querySelectorAll('.list-entry'));
  1523. if (entries.indexOf(entry1) < 0 || entries.indexOf(entry2) < 0) return;
  1524. if (entry1 == entry2) {
  1525.  
  1526.  
  1527.  
  1528. for (const entry of entries) {
  1529. if (entry === entry1) {
  1530. if (!entry.classList.contains('selected'))
  1531. toggleEntrySelection(entry);
  1532. } else {
  1533. if (entry.classList.contains('selected'))
  1534. toggleEntrySelection(entry);
  1535. }
  1536. }
  1537.  
  1538. return;
  1539. }
  1540.  
  1541. for (const entry of entries) {
  1542. if (entry === entry1 || entry === entry2) {
  1543. startSelection = !startSelection;
  1544. if (!entry.classList.contains('selected'))
  1545. toggleEntrySelection(entry);
  1546. } else if (startSelection) {
  1547.  
  1548. if (!entry.classList.contains('selected'))
  1549. toggleEntrySelection(entry);
  1550. } else if (!startSelection) {
  1551.  
  1552. if (entry.classList.contains('selected'))
  1553. toggleEntrySelection(entry);
  1554. }
  1555. }
  1556. }
  1557.  
  1558. container.addEventListener('click', (e) => {
  1559. if (e.target.matches('.list-entry input')) return;
  1560.  
  1561. const entry = e.target.closest('.list-entry');
  1562. if (!entry) return;
  1563.  
  1564. if (e.detail === 2) {
  1565. editEntries(selectedEntries.length > 0 ? selectedEntries : [entry]);
  1566. } else {
  1567. if (e.ctrlKey || e.metaKey) {
  1568. toggleEntrySelection(entry);
  1569. if (!firstSelectedEntry) {
  1570. firstSelectedEntry = entry;
  1571. }
  1572. } else if (e.shiftKey && firstSelectedEntry) {
  1573. selectEntriesBetween(firstSelectedEntry, entry);
  1574. } else {
  1575. selectedEntries.forEach((e) => e.classList.remove('selected'));
  1576. selectedEntries = [entry];
  1577. firstSelectedEntry = entry;
  1578. toggleEntrySelection(entry);
  1579. }
  1580. }
  1581. });
  1582.  
  1583.  
  1584. container.addEventListener('blur', (e) => {
  1585. if (!e.target.matches('.list-entry input.value')) return;
  1586. const entry = e.target.closest('.list-entry');
  1587. let newValue = e.target.value.trim();
  1588.  
  1589. let valueDom = entry.querySelector('span.value div');
  1590. let oldValue = valueDom.textContent.trim();
  1591. if (oldValue !== newValue) {
  1592.  
  1593. const isBoolean = /^(true|false)$/i.test(oldValue);
  1594. if (isBoolean) {
  1595. if (/^(0)$/.test(newValue)) {
  1596. newValue = false;
  1597. } else
  1598. if (/^(1)$/.test(newValue)) {
  1599. newValue = true;
  1600. }
  1601. }
  1602.  
  1603. const isValidBoolean = /^(true|false)$/i.test(newValue);
  1604. const isValidNumber = /^-?\d+(\.\d+)?$/.test(newValue);
  1605. const isValidString = /^"([^"]|\\")*"$/.test(newValue);
  1606.  
  1607. if (!isValidBoolean && !isValidNumber && !isValidString) {
  1608. entry.classList.remove('editing');
  1609. e.target.value = oldValue;
  1610. } else {
  1611. entry.classList.remove('editing');
  1612. valueDom.textContent = newValue;
  1613. }
  1614. } else {
  1615. entry.classList.remove('editing');
  1616. }
  1617. }, true);
  1618.  
  1619. container.addEventListener('dblclick', (e) => {
  1620. if (!e.target.matches('.list-entry span.value')) return;
  1621. const target = e.target;
  1622. requestAnimationFrame(() => {
  1623.  
  1624. const entry = target.closest('.list-entry');
  1625. const input = entry.querySelector('input.value');
  1626. if (input) {
  1627. input.setSelectionRange(0, input.value.length);
  1628. }
  1629.  
  1630. })
  1631. });
  1632.  
  1633. const selectAdjacentEntry = (entry, direction, addToSelection) => {
  1634. if (!entry) return;
  1635.  
  1636. let adjacentEntry = direction === 'up' ? entry.previousElementSibling : entry.nextElementSibling;
  1637.  
  1638. if (!adjacentEntry) return;
  1639. while (adjacentEntry) {
  1640. if (adjacentEntry.matches('.list-hide-minor-same .list-entry.list-entry-minorkey-same')) {
  1641. adjacentEntry = direction === 'up' ? adjacentEntry.previousElementSibling : adjacentEntry.nextElementSibling;
  1642. } else {
  1643. break;
  1644. }
  1645. }
  1646.  
  1647. if (!adjacentEntry) return;
  1648.  
  1649. if (!addToSelection) {
  1650. selectedEntries.forEach((e) => e.classList.remove('selected'));
  1651. selectedEntries = [];
  1652. } else {
  1653. if (adjacentEntry.classList.contains('selected')) {
  1654. lastSelectedEntry = adjacentEntry;
  1655. toggleEntrySelection(entry);
  1656. return;
  1657. }
  1658. }
  1659.  
  1660. toggleEntrySelection(adjacentEntry);
  1661. };
  1662. function selectAllEntries() {
  1663. const entries = container.querySelectorAll('.list-entry:not(.selected)');
  1664. for (const entry of entries) {
  1665. toggleEntrySelection(entry);
  1666. }
  1667. }
  1668.  
  1669.  
  1670. container.addEventListener('keydown', (e) => {
  1671. if (e.target.matches('.list-entry input.value')) {
  1672.  
  1673.  
  1674. if (e.key === 'Enter') {
  1675. e.preventDefault();
  1676. let container = e.target.closest('.list-container');
  1677. e.target.blur();
  1678. container.focus();
  1679. }
  1680.  
  1681. if (e.key === 'Escape') {
  1682. e.preventDefault();
  1683. let container = e.target.closest('.list-container');
  1684. e.target.blur();
  1685. container.focus();
  1686. }
  1687.  
  1688. } else {
  1689.  
  1690.  
  1691. if ((e.ctrlKey || e.metaKey) && e.key === 'c') {
  1692. console.log(selectedEntries)
  1693. const lines = selectedEntries.map(entry => {
  1694. const key = entry.querySelector('.key div').textContent + ":";
  1695. const value = entry.querySelector('.value div').textContent;
  1696. return `${key} ${value}`;
  1697. });
  1698. const textToCopy = lines.join(',\n');
  1699. navigator.clipboard.writeText(textToCopy).then(() => {
  1700. console.log('Copied to clipboard');
  1701. }).catch((err) => {
  1702. console.error('Error copying to clipboard', err);
  1703. });
  1704. } else {
  1705.  
  1706. if (selectedEntries.length === 0) return;
  1707. if ((e.ctrlKey || e.metaKey) && e.key === 'a') {
  1708. e.preventDefault();
  1709. selectAllEntries();
  1710. } else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
  1711. if (lastSelectedEntry !== null && selectedEntries.indexOf(lastSelectedEntry) >= 0) {
  1712. selectAdjacentEntry(lastSelectedEntry, e.key === 'ArrowUp' ? 'up' : 'down', e.shiftKey);
  1713. } else {
  1714. lastSelectedEntry = null;
  1715. }
  1716. e.preventDefault();
  1717. } else if (e.key === 'Enter') {
  1718. if (!selectedEntries.some(entry => entry.classList.contains('editing'))) {
  1719. editEntries(selectedEntries);
  1720. }
  1721. }
  1722. }
  1723. }
  1724. });
  1725.  
  1726.  
  1727. }
  1728.  
  1729. function createDialog() {
  1730.  
  1731. const _themeProps_ = {
  1732. dialogBackgroundColor: '#f6f6f6',
  1733. dialogBackgroundColorDark: '#23252a',
  1734. backdropColor: '#b5b5b568',
  1735. textColor: '#111111',
  1736. textColorDark: '#f0f3f4',
  1737. zIndex: 60000,
  1738. fontSize: '10pt',
  1739. dialogMinWidth: '32px',
  1740. dialogMinHeight: '24px',
  1741. };
  1742.  
  1743. class VJSD extends VanillaJSDialog {
  1744.  
  1745. get themeProps() {
  1746. return _themeProps_
  1747. }
  1748.  
  1749. isDarkTheme() {
  1750. return document.documentElement.hasAttribute('dark');
  1751. }
  1752.  
  1753. onBeforeShow() {
  1754.  
  1755. }
  1756.  
  1757. onFirstCreation() {
  1758.  
  1759. const S = this.S; /* this is the global method */
  1760.  
  1761. /* on top of the setup function, override the icon widget on global method */
  1762. S.widgets.icon = (iconTag) => {
  1763. return S.ce('i', { className: 'vjsd-icon fa-solid fa-' + iconTag });
  1764. }
  1765.  
  1766. /* you might also overide `S.importCSS` by the use of Userscript Manager's import */
  1767. S.importCSS(
  1768. 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/fontawesome.min.css#sha512=SgaqKKxJDQ/tAUAAXzvxZz33rmn7leYDYfBP+YoMRSENhf3zJyx3SBASt/OfeQwBHA1nxMis7mM3EV/oYT6Fdw==',
  1769. // 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/brands.min.css',
  1770. 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/solid.min.css#sha512=yDUXOUWwbHH4ggxueDnC5vJv4tmfySpVdIcN1LksGZi8W8EVZv4uKGrQc0pVf66zS7LDhFJM7Zdeow1sw1/8Jw=='
  1771. );
  1772.  
  1773. /* load CSS files, etc - You might overide the `getTheme()` in VanillaJSDialog */
  1774. this.themeSetup();
  1775. }
  1776.  
  1777. /* init is called after setup function is called */
  1778. init() {
  1779. const S = this.S; /* this is the global method */
  1780.  
  1781. const es = this.es; /* this is a store for HTMLElements binded to this dialog */
  1782.  
  1783. es.dialog = S.ce('div', {
  1784. className: 'vjsd-dialog'
  1785. }, {
  1786. '__vjsd__': ''
  1787. });
  1788.  
  1789. es.dialog.append(
  1790. es.header = S.ce('div', {
  1791. className: 'vjsd-dialog-header vjsd-hflex'
  1792. }),
  1793. es.body = S.ce('div', {
  1794. className: 'vjsd-dialog-body vjsd-gap-2 vjsd-overscroll-none vjsd-vflex'
  1795. }),
  1796.  
  1797. );
  1798.  
  1799.  
  1800. es.footer = S.ce('div', {
  1801. className: 'vjsd-dialog-footer vjsd-hflex'
  1802. });
  1803.  
  1804. es.header.append(
  1805. S.widgets.icon('circle-info', (a) => {
  1806.  
  1807. }),
  1808. S.widgets.title('YouTube Configuration', {
  1809. className: 'vjsd-flex-fill'
  1810. }),
  1811. S.widgets.buttonIcon('square-xmark', {
  1812. 'vjsd-clickable': '#dialogXmark'
  1813. })
  1814. );
  1815.  
  1816. const checkBoxChanged = () => {
  1817. let elmChoice1 = [...document.getElementsByName('tabview-tab-default')].filter(e => e.checked).map(e => e.value);
  1818. console.assert(elmChoice1.length <= 1);
  1819. es.checkboxSelectionDisplay.textContent = elmChoice1.length === 1 ? `The default tab will be set to ${elmChoice1[0]}` : `The default tab will be reset.`;
  1820. }
  1821.  
  1822. es.body.append(
  1823. es.ycConfigPlacholder = S.ce('div', { id: 'yc-config-placeholder' })
  1824. );
  1825.  
  1826. const onXMarkClicked = () => {
  1827. this.dismiss();
  1828. }
  1829.  
  1830. const onClearClicked = () => {
  1831. es.checkbox1.checked = false;
  1832. es.checkbox2.checked = false;
  1833. es.checkbox3.checked = false;
  1834. checkBoxChanged();
  1835. }
  1836.  
  1837. const onConfirmClicked = () => {
  1838. let myDefaultTab = null;
  1839. for (const checkbox of document.getElementsByName('tabview-tab-default')) {
  1840. if (checkbox.checked) myDefaultTab = checkbox.value;
  1841. }
  1842. myDefaultTab = myDefaultTab || null;
  1843. console.log(myDefaultTab)
  1844. setMyDefaultTab(myDefaultTab);
  1845. this.dismiss();
  1846. }
  1847.  
  1848. const onCancelClicked = () => {
  1849. this.dismiss();
  1850. }
  1851.  
  1852. es.footer.append(
  1853. es.clearButton = S.widgets.button('Clear', {
  1854. 'vjsd-clickable': '#clear'
  1855. }),
  1856. S.widgets.space(),
  1857. S.widgets.button('Cancel', {
  1858. 'vjsd-clickable': '#cancel'
  1859. }),
  1860. S.widgets.button('Confirm', {
  1861. 'vjsd-clickable': '#confirm'
  1862. }),
  1863. )
  1864.  
  1865. this.clickable('#cancel', onCancelClicked)
  1866. this.clickable('#clear', onClearClicked)
  1867. this.clickable('#confirm', onConfirmClicked)
  1868. this.clickable('#dialogXmark', onXMarkClicked);
  1869.  
  1870. this.backdrop = 'dismiss';
  1871. document.body.appendChild(es.dialog)
  1872. }
  1873. }
  1874.  
  1875. VJSD.setup1();
  1876. return new VJSD();
  1877. }
  1878.  
  1879.  
  1880.  
  1881.  
  1882. let dialog = null;
  1883.  
  1884.  
  1885. let containerWrapper = null;
  1886.  
  1887.  
  1888. GM_registerMenuCommand("Read", function () {
  1889.  
  1890. addCSSForList();
  1891.  
  1892.  
  1893. let p = getModuleGetConfig()
  1894. console.log(p);
  1895.  
  1896. const ytEntries = p;
  1897. let container = null;
  1898.  
  1899. if (containerWrapper === null) {
  1900.  
  1901. container = document.createElement('div');
  1902. container.className = 'list-container list-hide-minor-same';
  1903. container.setAttribute('tabindex', '0');
  1904.  
  1905. containerWrapper = document.createElement('div');
  1906. containerWrapper.className = 'list-container-wrapper';
  1907. containerWrapper.setAttribute('tabindex', '-1');
  1908.  
  1909. containerWrapper.appendChild(container);
  1910. } else {
  1911. container = containerWrapper.querySelector('.list-container');
  1912. container.textContent = '';
  1913. }
  1914.  
  1915. // const container = document.querySelector('#list-container');
  1916. // createConfigEditor(container, ytEntries);
  1917.  
  1918. createConfigEditor(container, ytEntries);
  1919. console.log(containerWrapper);
  1920.  
  1921.  
  1922.  
  1923. dialog = dialog || createDialog();
  1924. dialog.show();
  1925.  
  1926. document.querySelector('#yc-config-placeholder').appendChild(containerWrapper);
  1927.  
  1928.  
  1929.  
  1930.  
  1931. });
  1932.  
  1933.  
  1934.  
  1935. function moduleSetYC() {
  1936.  
  1937. let configMap = new WeakSet();
  1938.  
  1939. function cloneIt(target, source) {
  1940.  
  1941. if (!target) return;
  1942.  
  1943. if (configMap.has(target)) return;
  1944.  
  1945. configMap.add(target)
  1946.  
  1947. Object.assign(target, source);
  1948.  
  1949. return true;
  1950.  
  1951. }
  1952. function assign(target, key, value) {
  1953.  
  1954. let m = key.split('.');
  1955. let object = target;
  1956. for (let i = 0; i < m.length - 1; i++) {
  1957.  
  1958. let k = m[i];
  1959. if (object[k] && typeof object[k] == 'object') {
  1960. object = object[k];
  1961. } else {
  1962. return;
  1963. }
  1964.  
  1965. }
  1966. if (object && m[m.length - 1]) {
  1967. object[m[m.length - 1]] = value;
  1968. }
  1969.  
  1970. }
  1971.  
  1972. function cloneIt2(target, source) {
  1973.  
  1974.  
  1975. if (!target) return;
  1976.  
  1977. if (configMap.has(target)) return;
  1978.  
  1979. configMap.add(target)
  1980.  
  1981. for (const key of Object.keys(source)) {
  1982.  
  1983. assign(target, key, source[key]);
  1984.  
  1985. }
  1986. return true;
  1987.  
  1988.  
  1989. }
  1990.  
  1991. let pConfig = `
  1992. EXPERIMENT_FLAGS.action_companion_center_align_description: true,
  1993. EXPERIMENT_FLAGS.action_companion_center_align_description: true,
  1994. EXPERIMENT_FLAGS.enable_pacf_through_ybfe_tv_for_page_top_formats: true,
  1995. EXPERIMENT_FLAGS.enable_rta_manager: true,
  1996. EXPERIMENT_FLAGS.kevlar_enable_em_offlineable_discovery: true,
  1997. EXPERIMENT_FLAGS.kevlar_show_em_dl_btn: true,
  1998. EXPERIMENT_FLAGS.kevlar_show_em_dl_menu_item: true,
  1999. EXPERIMENT_FLAGS.kevlar_show_em_dl_settings_tab: true,
  2000. EXPERIMENT_FLAGS.max_prefetch_window_sec_for_livestream_optimization: 10,
  2001. EXPERIMENT_FLAGS.min_prefetch_offset_sec_for_livestream_optimization: 20,
  2002. EXPERIMENT_FLAGS.polymer_on_demand_shady_dom: true,
  2003. EXPERIMENT_FLAGS.suggest_caption_correction_menu_item: true,
  2004. EXPERIMENT_FLAGS.use_rta_manager_for_async: true,
  2005. EXPERIMENT_FLAGS.web_enable_imp_audio_cc: true,
  2006. EXPERIMENT_FLAGS.web_enable_pdp_mini_player: true,
  2007. EXPERIMENT_FLAGS.web_modern_surveys: true,
  2008. EXPERIMENT_FLAGS.web_modern_vwt_surveys: true,
  2009. EXPERIMENT_FLAGS.web_modern_vwt_surveys_sampled: true,
  2010. EXPERIMENT_FLAGS.web_modern_vwt_surveys_sampled_unclickable_video: true,
  2011. EXPERIMENT_FLAGS.web_modern_vwt_surveys_v2: true,
  2012. EXPERIMENT_FLAGS.web_player_caption_language_preference_stickiness_duration: 0,
  2013. FEXP_EXPERIMENTS.1: 23986017,
  2014. FEXP_EXPERIMENTS.10: 24405914,
  2015. FEXP_EXPERIMENTS.11: 24415864,
  2016. FEXP_EXPERIMENTS.12: 24433679,
  2017. FEXP_EXPERIMENTS.13: 24437577,
  2018. FEXP_EXPERIMENTS.14: 24439361,
  2019. FEXP_EXPERIMENTS.15: 24443594,
  2020. FEXP_EXPERIMENTS.16: 24449113,
  2021. FEXP_EXPERIMENTS.17: 24468691,
  2022. FEXP_EXPERIMENTS.18: 24470719,
  2023. FEXP_EXPERIMENTS.19: 24483241,
  2024. FEXP_EXPERIMENTS.2: 24000320,
  2025. FEXP_EXPERIMENTS.20: 24499792,
  2026. FEXP_EXPERIMENTS.21: 24514873,
  2027. FEXP_EXPERIMENTS.22: 24516157,
  2028. FEXP_EXPERIMENTS.23: 24537882,
  2029. FEXP_EXPERIMENTS.24: 24550458,
  2030. FEXP_EXPERIMENTS.25: 24557784,
  2031. FEXP_EXPERIMENTS.3: 24004644,
  2032. FEXP_EXPERIMENTS.4: 24007246,
  2033. FEXP_EXPERIMENTS.5: 24080738,
  2034. FEXP_EXPERIMENTS.6: 24135310,
  2035. FEXP_EXPERIMENTS.7: 24208765,
  2036. FEXP_EXPERIMENTS.8: 24219382,
  2037. FEXP_EXPERIMENTS.9: 24255165,
  2038. GAPI_LOCALE: "en_US",
  2039. GL: "JP",
  2040. GOOGLE_FEEDBACK_PRODUCT_DATA.accept_language: "ja,en;q=0.9,en-GB;q=0.8,en-US;q=0.7",
  2041. HL: "en",
  2042. HTML_LANG: "en",
  2043. INNERTUBE_CONTEXT.request.consistencyTokenJars.0.encryptedTokenJarContents: "ACeCFAWPJTilGecAEUw37owUN5_xgOWFbkxSbkG-z1L__jJzx90RSyjM8p6MiYgVKLx7lfx4fBplED4ZHvwM9ONpBLAr-kYBW1tcXp1vaKvA3Z-7vSUl3dvCVZA02bkjDPA4VsQlfB37Iv9tAzMwVR_EA_C0N-wHqgcdqZ12SR2OYA",
  2044. INNERTUBE_CONTEXT_GL: "JP",
  2045. INNERTUBE_CONTEXT_HL: "en",
  2046. LIVE_CHAT_BASE_TANGO_CONFIG.requiresAuthToken: false,
  2047. LOGGED_IN: true,
  2048. PAGE_BUILD_LABEL: "youtube.desktop.web_20230504_01_RC00",
  2049. PAGE_CL: 529318761,
  2050. SBOX_LABELS.SUGGESTION_DISMISSED_LABEL: "Suggestion removed",
  2051. SBOX_LABELS.SUGGESTION_DISMISS_LABEL: "Remove",
  2052. SBOX_SETTINGS.REQUEST_LANGUAGE: "en",
  2053. SBOX_SETTINGS.SBOX_STRINGS.SBOX_REPORT_SUGGESTIONS: "Report search predictions",
  2054. SBOX_SETTINGS.SUGGESTION_BOX_RESTYLE: false,
  2055. TIME_CREATED_MS: 1683272855180,
  2056. initialBodyClientWidth: 1263,
  2057. initialInnerHeight: 569,
  2058. initialInnerWidth: 1280
  2059. `;
  2060. pConfig = pConfig.split(',\n').map(x => x.split(': '));
  2061. let qConfig = {};
  2062. for (const s of pConfig) {
  2063. try{
  2064. qConfig[s[0].trim()] = JSON.parse(s[1]);
  2065. }catch(e){}
  2066. }
  2067.  
  2068. function configSet() {
  2069.  
  2070. const yt = uWind.yt;
  2071. if (!yt) return;
  2072.  
  2073. if (yt && yt.config_) {
  2074.  
  2075. cloneIt2(yt.config_, qConfig);
  2076.  
  2077. /*
  2078. cloneIt2(yt.config_, {
  2079. PAGE_BUILD_LABEL: "youtube.desktop.web_20230504_01_RC00",
  2080. PAGE_CL: 529318761,
  2081. GAPI_LOCALE: "en_US",
  2082. GL: "JP",
  2083. HL: "en",
  2084. HTML_LANG: "en",
  2085. INNERTUBE_CONTEXT_GL: "JP",
  2086. INNERTUBE_CONTEXT_HL: "en",
  2087. LOGGED_IN: true,
  2088. PAGE_BUILD_LABEL: "youtube.desktop.web_20230504_01_RC00",
  2089. PAGE_CL: 529318761,
  2090. })
  2091. */
  2092. }
  2093.  
  2094. if (yt && yt.config_ && yt.config_.EXPERIMENT_FLAGS) {
  2095.  
  2096. cloneIt(yt.config_.EXPERIMENT_FLAGS, {
  2097. });
  2098. }
  2099.  
  2100. // TODO
  2101.  
  2102.  
  2103. }
  2104. let afk = 0;
  2105. const MAX_AFK = 1e5; // don't change
  2106. const PROCESS_UNLOCK_MULTIPLER = 180; // 16 for slow PC; 180 for forced effectiveness
  2107. const FORCED_TIMEOUT = 4000; // actually 1000ms shall be fine
  2108. const af = async () => {
  2109. while (afk < MAX_AFK) {
  2110. // for Mac M1, afk ends at 1000
  2111.  
  2112. configSet();
  2113. if (((++afk) % PROCESS_UNLOCK_MULTIPLER) === 0) {
  2114. await Promise.race([new Promise(r => requestAnimationFrame(r)), new Promise(r => setTimeout(r, 0))]);
  2115. } else {
  2116. await Promise.resolve(0);
  2117. }
  2118.  
  2119. }
  2120. }
  2121. af();
  2122.  
  2123.  
  2124. const afBreakEventHandler = () => {
  2125. afk = MAX_AFK;
  2126. }
  2127.  
  2128. // play safe
  2129. setTimeout(afBreakEventHandler, FORCED_TIMEOUT);
  2130.  
  2131. // here we introduced two event hanlding to end the config force set.
  2132. document.addEventListener('navigate-finish', afBreakEventHandler, true);
  2133. document.addEventListener('yt-page-data-updated', afBreakEventHandler, true);
  2134.  
  2135. }
  2136.  
  2137. // moduleSetYC();
  2138.  
  2139.  
  2140. // Your code here...
  2141. })(typeof unsafeWindow === 'object' ? unsafeWindow : window);