Last active
August 29, 2015 13:57
-
-
Save davestewart/9722022 to your computer and use it in GitHub Desktop.
Unlock all heart domains from their "list domains" page.
This file contains 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
var str = ''; | |
$('a[href^="/domains/"]').each(function(i, e){ | |
var $e = $(e); | |
var url = $(e).attr('href').replace('index.cgi', 'action.cgi?action=lock_unset'); | |
$(e).attr('href', url); | |
$.get(url, function(data){ | |
data = data.replace(/^[\s\S]+?<body.+?>|<\/body>[\s\S]+$/g, ''); | |
var $dom = $('<div>').html(data); | |
str += $dom.find('#yesbox p').text() + '\n'; | |
console.clear(); | |
console.log(str); | |
}); | |
console.log(url); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment