Skip to content

Instantly share code, notes, and snippets.

@corpix
Last active December 15, 2015 20:48
Show Gist options
  • Select an option

  • Save corpix/5320966 to your computer and use it in GitHub Desktop.

Select an option

Save corpix/5320966 to your computer and use it in GitHub Desktop.
wgetify vk.com/audio
load = function() {
load.getScript("https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js");
};
// dynamically load any javascript file.
load.getScript = function(filename) {
var s = document.createElement('script');
s.setAttribute("type","text/javascript");
s.setAttribute("onreadystatechange", "DOMLoaded()");
s.setAttribute("onload", "DOMLoaded()");
s.setAttribute("src", filename);
typeof s != "undefined" &&
document.getElementsByTagName("head")[0].appendChild(s)
};
load();
function DOMLoaded(){
$('a')
.each(function(i,a){
console.log('wget', $(a).closest('.area').find('input[type=hidden]').val().split(',')[0]);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment