Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YouTube] Duplicated Menu Button #26

Closed
cyfung1031 opened this issue Aug 19, 2023 · 0 comments · Fixed by #27
Closed

[YouTube] Duplicated Menu Button #26

cyfung1031 opened this issue Aug 19, 2023 · 0 comments · Fixed by #27
Labels
bug Something isn't working

Comments

@cyfung1031
Copy link
Contributor

cyfung1031 commented Aug 19, 2023

If the experimental flags "kevlar_tuner_should_test_maintain_stable_list" and "kevlar_should_maintain_stable_list" are enabled, the settings button will be added every time after clicking the "3 dots."

UserScript to enable both flags for testing.

// ==UserScript==
// @name        Testing Script 186
// @namespace   Violentmonkey Scripts
// @match       https://www.youtube.com/live_chat*
// @grant       none
// @version     1.0
// @author      -
// @description 8/19/2023, 11:41:39 PM
// @run-at              document-start
// @grant               none
// @unwrap
// @allFrames           true
// @inject-into         page
// ==/UserScript==

(() => {
  'use strict';

  const updateFlags = () => {
    const EXPERIMENT_FLAGS = (window.ytcfg && window.ytcfg.data_) ? window.ytcfg.data_.EXPERIMENT_FLAGS : null;
    if (!EXPERIMENT_FLAGS) return;
    Object.assign(EXPERIMENT_FLAGS, {
      kevlar_tuner_should_test_maintain_stable_list: true,
      kevlar_should_maintain_stable_list: true
    });
  };

  const mo = new MutationObserver(updateFlags);
  mo.observe(document, { subtree: true, childList: true });

  updateFlags();

})();

Screenshot:

Screen Shot 2023-08-19 at 23 31 59 Screen Shot 2023-08-20 at 0 20 46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant