Last active
November 14, 2017 08:05
-
-
Save nathansmith/46eeae1d45ada2ec66b6dfd1364ac567 to your computer and use it in GitHub Desktop.
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
/* | |
# WHAT IS THIS? | |
Use this method on Flickr's camera roll page. | |
https://www.flickr.com/cameraroll | |
Then, scroll the page gradually, which allows | |
Flickr to lazy load the images and links. | |
Eventually, all the "select all" links will | |
be clicked. After which, you can click | |
"download" to get all of your photos. | |
# HOW TO USE: | |
Cut and paste the following code into | |
the Chrome dev tools "console" area, | |
hit enter, and scroll down the page. | |
*/ | |
(function () { | |
const d = document | |
const e = d.createEvent('MouseEvents') | |
const f = Array.prototype.forEach | |
e.initMouseEvent( | |
'click', | |
true, | |
true, | |
window, | |
0, | |
0, | |
0, | |
0, | |
0, | |
false, | |
false, | |
false, | |
false, | |
0, | |
null | |
) | |
setInterval(function () { | |
const links = d.querySelectorAll( | |
'[data-track="selectAllClick"]' | |
) | |
f.call(links, function (item) { | |
item.dispatchEvent(e) | |
}) | |
}, 0) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment