Last active
December 15, 2015 14:49
-
-
Save berlysia/5277530 to your computer and use it in GitHub Desktop.
モバマスアルバム一覧化スクリプト
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 listTables,f,update,output,showImgs; | |
showImgs = false; //debugというか負荷軽減というか 軽減するのだろうか | |
listTables = new Array(); | |
update = function(){ | |
listTables.push($("#headerAcdPanel > div:first > table tbody tr")); | |
return f($(".paging:nth-child(3) a").attr("href")); | |
}; | |
output = function(){ | |
$("#headerAcdPanel").empty().append('<div style="text-align:center"><table width="70%" id="result"></table></div>'); | |
for (var i=0;i<listTables.length;i++) { | |
for (var j=0;j<listTables[i].length;j++) { | |
$("#result").append(listTables[i][j]); | |
}; | |
}; | |
showImgs || $("#headerAcdPanel").removeAttr("style"); | |
$("#tmpmsg").remove(); | |
}; | |
f = function(nextUrl){ | |
if (typeof nextUrl !== "undefined") { | |
$("#headerAcdPanel").load(nextUrl + " #headerAcdPanel div:has(table):not(div:has(table):first)",function(){update();}); | |
} else { | |
output(); | |
}; | |
}; | |
$("#headerAcdPanel > *:not(div:has(table)), #headerAcdPanel > div:has(table):first").remove(); | |
showImgs || $("#headerAcdPanel").css("display","none"); | |
$("body").append("<p id='tmpmsg'>しばらくお待ちください……</p>"); | |
update(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment