Reboot Tube But Nice

7/21/2022, 7:35:45 AM

  1. // ==UserScript==
  2. // @name Reboot Tube But Nice
  3. // @namespace Violentmonkey Scripts
  4. // @match https://reboot.tube/x/*
  5. // @grant none
  6. // @version 1.1
  7. // @license GPLv3
  8. // @author Gum Coblin
  9. // @description 7/21/2022, 7:35:45 AM
  10. // ==/UserScript==
  11. // Player Size
  12. document.getElementById("videowrap").style.width = "85%"
  13.  
  14. // Chat visibility
  15. document.getElementById("chatwrap").style.display = "none"
  16.  
  17. // Empty footer visibilty
  18. document.getElementById("footer").style.display = "none"
  19.  
  20. // Padding on the left of the player to center it
  21. document.getElementById("videowrap").style.paddingLeft = "15%"
  22.  
  23. // Set control width to 100% so the rightmost controls are on the right of the screen
  24. document.getElementById("rightcontrols").style.width = "100%"
  25.  
  26. var currentURL = ""
  27. setTimeout(CreateLink, 5000)
  28.  
  29.  
  30. function CreateLink(){
  31. // Create a variable containing the link to the currently playing video
  32. currentURL = document.getElementById("ytapiplayer_html5_api").src
  33. console.log(currentURL)
  34. // Create a link to the URL from above
  35. const myLink = document.createElement("a");
  36. myLink.href = currentURL
  37. myLink.style.color = "white"
  38. myLink.innerHTML = currentURL
  39. document.getElementById("mainpage").appendChild(myLink)
  40. }