Hide Youtube seek bar

Hide Youtube's seek bar with your context menu

  1. // ==UserScript==
  2. // @name Hide Youtube seek bar
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Hide Youtube's seek bar with your context menu
  6. // @author WhiteTapeti
  7. // @match *://www.youtube.com/watch?v=*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
  9. // @run-at context-menu
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. var hiddenSeekbarThingE = 0;
  14. if (hiddenSeekbarThingE == 0) {
  15. console.log('add seekbar styles')
  16. var elemDivHiddenSeekbarThing = document.createElement('div');
  17. elemDivHiddenSeekbarThing.innerHTML = ( `
  18. <style>
  19. .ytp-chrome-top.hidden-seekbar-thing,.ytp-chrome-bottom.hidden-seekbar-thing, .ytp-gradient-top.hidden-seekbar-thing, .ytp-gradient-bottom.hidden-seekbar-thing {display:none!important;}
  20. </style>
  21. `);
  22. document.body.append(elemDivHiddenSeekbarThing);
  23. hiddenSeekbarThingE = 1;
  24. }
  25. var seekBarThing = document.querySelector('.ytp-chrome-top');
  26. seekBarThing.classList.toggle('hidden-seekbar-thing');
  27. console.log(seekBarThing);
  28. seekBarThing = document.querySelector('.ytp-chrome-bottom');
  29. seekBarThing.classList.toggle('hidden-seekbar-thing');
  30. console.log(seekBarThing);
  31. seekBarThing = document.querySelector('.ytp-gradient-top');
  32. seekBarThing.classList.toggle('hidden-seekbar-thing');
  33. console.log(seekBarThing);
  34. seekBarThing = document.querySelector('.ytp-gradient-bottom');
  35. seekBarThing.classList.toggle('hidden-seekbar-thing');
  36. console.log(seekBarThing);
  37. })();