Skip to content

Instantly share code, notes, and snippets.

@larvata
Last active May 25, 2016 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larvata/6045637 to your computer and use it in GitHub Desktop.
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.
// ==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