Skip to content

Instantly share code, notes, and snippets.

@marco-souza
Created July 16, 2018 02:20
Show Gist options
  • Save marco-souza/2f65cb6860e636903f0b5376aca6c2d7 to your computer and use it in GitHub Desktop.
Save marco-souza/2f65cb6860e636903f0b5376aca6c2d7 to your computer and use it in GitHub Desktop.
const getList = classname => [...document.getElementsByClassName(classname)]
.map(i => i.currentSrc)
.filter(i => String(i).includes(`frame`))
.map(i => i.replace(`_frame1.jpg`, ''))
.map(i => i.replace(`https://78.media.tumblr.com/`, ''))
.map(i => i.replace(`_frame1.jpg`, ''))
.map(i => `https://vtt.tumblr.com/${i}_480.mp4`)
const getVideos = () => getList('picture')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment