Created
December 19, 2020 11:34
-
-
Save Bestulo/1c0b436fccce7b0e9716211d31d6e0f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works for a max of 50 entries | |
// Needs to inject jQuery first so you can use .map (Reddit uses Jquery Slim which can't map) | |
// Just copy and paste the contents of minified jQuery into console, then $ = jQuery | |
// https://code.jquery.com/jquery-3.5.1.min.js | |
const idarr = [] | |
$(".entry a.title").map((a, b) => idarr.push(/youtu(?:.*\/v\/|.*v\=|\.be\/)([A-Za-z0-9_\-]{11})/.exec($(b).attr('href'))[1])) | |
console.log('https://www.youtube.com/watch_videos?video_ids=' + idarr.join(',')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment