Last active
April 9, 2020 17:22
-
-
Save PatheticMustan/e38f24cc24646ffac257c71b4676f6e8 to your computer and use it in GitHub Desktop.
Wow, now a handy dandy bookmarklet to get the source of a video!
This file contains 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
// Alert src | |
alert(document.getElementsByTagName("video")[0].children[0].src) | |
// Open new tab | |
window.open(document.getElementsByTagName("video")[0].children[0].src, '_blank') | |
// Alert src bookmarklet | |
javascript:alert(document.getElementsByTagName("video")[0].children[0].src) | |
// Open new tab bookmarklet | |
javascript:window.open(document.getElementsByTagName("video")[0].children[0].src,'_blank') |
It might say "popup blocked", but it's just being fussy about opening new tabs. You can disable it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If it's a youtube video, use these scripts instead.
Or opening it at it's original youtube source.