Last active
May 25, 2016 20:20
-
-
Save larvata/6045637 to your computer and use it in GitHub Desktop.
this is a Tampermonkey script for itunes.click album cover for download it as 1200x1200 resulotion.
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
// ==UserScript== | |
// @name itunes Large Cover | |
// @namespace https://github.com/larvata | |
// @version 0.1 | |
// @description click album cover for download it as 1200x1200 resulotion. | |
// @match https://itunes.apple.com/*/album/* | |
// @copyright 2013+, Larvata | |
// ==/UserScript== | |
var artworks=document.getElementsByClassName('artwork'); | |
for(var i=0;i<artworks.length;i++){ | |
var tImg=artworks[i]; | |
if(tImg.nodeName=='IMG'&&tImg.width==170&&tImg.height==170){ | |
var tLink=artworks[i].parentNode.parentNode; | |
tLink.href=tImg.src.replace('170x170','1200x1200'); | |
tLink.setAttribute('target','_blank'); | |
tLink.setAttribute('download',tImg.alt); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment