Greasy Fork is available in English.

youtube playlist style changer

change 30/08/17 playlist style to older version (dark)

  1. // ==UserScript==
  2. // @name youtube playlist style changer
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description change 30/08/17 playlist style to older version (dark)
  6. // @author bitrate16
  7. // @match http://www.youtube.com/watch?*
  8. // @match https://www.youtube.com/watch?*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12.  
  13. function waitForElementToDisplay(selector, time, handler) {
  14. if (document.querySelector(selector) != null) {
  15. handler();
  16. return;
  17. } else {
  18. setTimeout(function () {
  19. waitForElementToDisplay(selector, time, handler);
  20. }, time);
  21. }
  22. }
  23.  
  24.  
  25. (function() {
  26. 'use strict';
  27. waitForElementToDisplay("ytd-playlist-panel-video-renderer", 200, function() {
  28.  
  29. var list = document.getElementsByClassName('ytd-playlist-panel-renderer');
  30.  
  31. for(var i = 0; i < list.length; i++)
  32. if(list[i].hasAttribute('selected'))
  33. list[i].style.background = '#DDD';
  34. });
  35. })();