Created
March 22, 2018 18:13
-
-
Save mscottford/c545ecb3f455a16ce89ff560030178d3 to your computer and use it in GitHub Desktop.
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
// Run this from the console in Chrome when viewing an image on WallpapersCraft. | |
// It will download the 3840x2400 version of the image to your downloads folder. | |
// Example url: https://wallpaperscraft.com/wallpaper/television_wire_interference_57268 | |
console.save = function(url) { | |
e = document.createEvent('MouseEvents'); | |
a = document.createElement('a'); | |
a.download = url; | |
a.href = url; | |
e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
a.dispatchEvent(e); | |
}; | |
console.save($('body > div.all > div > div.center_wb > div.wallpaper_big > div.wb_preview > div.wb_resolution > div:nth-child(7) > a:nth-child(2)')[0].href.replace(/(\d)\/(\d)/, "$1_$2").concat('.jpeg').replace('download', 'image')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment