Last active
October 10, 2018 23:37
-
-
Save whizkydee/5164a5aa0aa77becc5c4c14bccf88868 to your computer and use it in GitHub Desktop.
openvideo.js - Lone Instagram video extractor.
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
// openvideo.js - Lone Instagram video extractor. | |
const openVideo = (() => { | |
location.hostname === 'www.instagram.com' | |
&& location.pathname.includes('/p/') ? ( | |
Promise.resolve(document.querySelector('._7thjo').click()) | |
.then(() => | |
window.location = document.querySelector('video').src | |
).catch(() => window.alert('We need a refactor, maybe ;)')) | |
) : window.alert('Oops. You\'re prolly not on the right page.') | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment