Load more followed channels (minimised)

Loads many more follower channels and keeps bar minimised.

  1. // ==UserScript==
  2. // @name Load more followed channels (minimised)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Loads many more follower channels and keeps bar minimised.
  6. // @author nmur
  7. // @match https://www.twitch.tv/*
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. window.addEventListener('load', function() {
  12. clickSideBarExpandButton();
  13. clickShowMoreButtonTwice();
  14. clickSideBarCloseButton();
  15. }, false);
  16. })();
  17.  
  18. function clickSideBarExpandButton() {
  19. var sideBarExpandButton = document.getElementsByClassName("side-nav__toggle-visibility--open")[0];
  20. if (sideBarExpandButton !== undefined) {
  21. sideBarExpandButton.click();
  22. }
  23. }
  24.  
  25. function clickShowMoreButtonTwice() {
  26. var showMoreButton = document.getElementsByClassName("side-nav-show-more-toggle__button")[0];
  27. showMoreButton.click();
  28. showMoreButton.click();
  29. }
  30.  
  31. function clickSideBarCloseButton() {
  32. var sideBarCloseButton = document.getElementsByClassName("side-nav__toggle-visibility")[0];
  33. sideBarCloseButton.click();
  34. }