Skip to content

Instantly share code, notes, and snippets.

@kapusta
Created February 12, 2015 16:25
Show Gist options
  • Save kapusta/c5cf0f65ea0cb6c0d587 to your computer and use it in GitHub Desktop.
Save kapusta/c5cf0f65ea0cb6c0d587 to your computer and use it in GitHub Desktop.
a crappy soundcloud download initiator, go to a SC page with downloads, open console, paste this in, hit return
(function(doc){
var buttonNodeList = doc.querySelectorAll('.sc-button-download');
var buttonArray = Array.prototype.slice.call(buttonNodeList);
var startAt = parseInt(prompt("Provide a number to start at..."), 10) || 0;
for (var i = startAt; i < buttonArray.length; i++) {
if (confirm("try to download track #"+ i + "?" + " " + buttonArray[i].download)) {
buttonArray[i].click();
}
}
}(window.document));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment