Last active
September 15, 2021 13:12
-
-
Save lightdiscord/425b35f59075c496c96019a4847d3c30 to your computer and use it in GitHub Desktop.
Intra 42 videos achievements
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
| (() => { | |
| const videos = [...document.querySelectorAll("a.video-item")]; | |
| const links = videos.map(anchor => anchor.href); | |
| const seenLinks = links.map(link => `${link}/seen`); | |
| const requests = seenLinks.map(link => fetch(link)); | |
| return Promise.all(requests) | |
| .then(() => console.log("You've seen a lot of videos today")); | |
| })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment