YouTube - Read Comments while Watching

This script reads comments while watching a video if you're acting like a tablet interface.

  1. // ==UserScript==
  2. // @name YouTube - Read Comments while Watching
  3. // @version 1.0.1
  4. // @description This script reads comments while watching a video if you're acting like a tablet interface.
  5. // @author Magma_Craft
  6. // @license MIT
  7. // @match https://www.youtube.com/*
  8. // @namespace https://greasyfork.org/en/users/933798
  9. // @icon https://www.youtube.com/favicon.ico
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. window['yt'] = window['yt'] || {};
  15. yt['config_'] = yt.config_ || {};
  16. yt.config_['EXPERIMENT_FLAGS'] = yt.config_.EXPERIMENT_FLAGS || {};
  17.  
  18. var iv = setInterval(function() {
  19. yt.config_.EXPERIMENT_FLAGS.kevlar_watch_comments_panel_button = true;
  20. yt.config_.EXPERIMENT_FLAGS.kevlar_watch_hide_comments_while_panel_open = true;
  21. yt.config_.EXPERIMENT_FLAGS.kevlar_watch_comments_ep_disable_theater = false;
  22. }, 1);
  23.  
  24. var to = setTimeout(function() {
  25. clearInterval(iv);
  26. }, 1000)
  27. })();
  28.  
  29. (function() {
  30. ApplyCSS();
  31.  
  32. function ApplyCSS() {
  33. var styles = document.createElement("style");
  34. styles.innerHTML=`
  35. /* Removes second comment teaser box */
  36. #comment-teaser.ytd-watch-metadata {
  37. display: none !important;
  38. }`
  39. document.head.appendChild(styles);
  40. }
  41. })();