Greasy Fork is available in English.

Copy Video Links from Youtube Watch Later

Copy Video Links from Youtube Watch Later for later downloading

  1. // ==UserScript==
  2. // @name Copy Video Links from Youtube Watch Later
  3. // @namespace ktaragorn
  4. // @description Copy Video Links from Youtube Watch Later for later downloading
  5. // @include https://www.youtube.com/playlist?list=WL
  6. // @version 2
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. function getUrls(){
  11. return JSON.stringify(Array.prototype.slice.call(document.querySelectorAll("a.ytd-playlist-video-renderer")).map(function(a){return a.href.replace(/&list=.*/g,'').replace(/&index=.*/g,'')}))
  12. }
  13.  
  14. window.linkClick= function(){
  15. if(confirm("Have you revealed all videos(click show more at the bottom)??")){
  16. prompt("Copy to clipboard", getUrls());
  17. alert("Now copy these videos to another playlist, delete from WL, delete the other playlist")
  18. }
  19. }
  20.  
  21. function createLink(){
  22. document.getElementById("title").innerHTML += '<a href="javascript:window.linkClick();">'+"Click to get all urls"+'</a>'
  23. }
  24.  
  25. createLink();