Skip to content

Instantly share code, notes, and snippets.

@thorsummoner
Created January 15, 2014 21:01
Show Gist options
  • Save thorsummoner/8444586 to your computer and use it in GitHub Desktop.
Save thorsummoner/8444586 to your computer and use it in GitHub Desktop.
Deviant-Art Downloader

This script opens the full-resolution image on a DA art view page and then closes that page.

Usage

Configuer your browser to automatically download image mimetypes, then begin opening thubnails that are apealing on the DA url of your choice.

// ==UserScript==
// @name New Script
// @include http://mlp-fim-wallpapers.deviantart.com/
// @exclude http://mlp-fim-wallpapers.deviantart.com/
// ==/UserScript==
console.log('Deviant Art Pony Wallappers!');
galleryPages = document.querySelectorAll('.tv150');
thumbNails = document.querySelectorAll('.thumb');
window.scrapeAllowed = window.confirm('Scrape Page?');
if (!window.scrapeAllowed) {
return;
}
document.body.innerHTML = 'Scrape Completed!<br />';
j = 0
$(thumbNails).each(function(){
if (j > 4) {
return;
}
i = document.createElement('iframe');
i.src = this.href;
document.body.appendChild(i);
j++;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment