Last active
December 16, 2015 05:19
-
-
Save dmongeau/5384056 to your computer and use it in GitHub Desktop.
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
$('body').append('<iframe src="about:blank" name="extractIframe" id="extractIframe"></iframe>') | |
$('form[name=MyArchivedPlaylistsForm]').attr('target','extractIframe'); | |
var binded = false; | |
var rowIndex = 1; | |
function loadNext() { | |
if(!binded) { | |
$('#extractIframe').bind('load',function() { | |
console.log('loaded'); | |
if(!$('#extractIframe').contents().find('form[name=PlaylistContentForm] table').length) { | |
return; | |
} | |
var $table = $('#extractIframe').contents().find('form[name=PlaylistContentForm] table').clone(); | |
$('body').append($table); | |
console.log('cloned'); | |
rowIndex++; | |
loadNext(); | |
}) | |
binded = true; | |
} | |
if(!$('form[name=MyArchivedPlaylistsForm] table.data_table tr:eq('+rowIndex+') td:last input').length) { | |
return; | |
} | |
$('form[name=MyArchivedPlaylistsForm] table.data_table tr:eq('+rowIndex+') td:last input').click(); | |
} | |
loadNext(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment