분류 | 게시판 |
베스트 |
|
유머 |
|
이야기 |
|
이슈 |
|
생활 |
|
취미 |
|
학술 |
|
방송연예 |
|
방송프로그램 |
|
디지털 |
|
스포츠 |
|
야구팀 |
|
게임1 |
|
게임2 |
|
기타 |
|
운영 |
|
임시게시판 |
|
(function(){function getEmails(){var emailChecker=/[0-9a-zA-Z][_0-9a-zA-Z-]*@[_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+){1,2}$/;var result=[];$(".memoContainerDiv").each(function(i,d){var items=$(d).find(".memoContentDiv").text().split(/(\n| )/);for(var j=0;j<items.length;j++)if(emailChecker.test(items[j]))result.push(setupInfomation(d))});return result}function getNormals(){var result=[];$(".memoContainerDiv").each(function(i,d){result.push(setupInfomation(d))});return result}function setupInfomation(elem){var obj=elem.obj={};elem=$(elem);var i=0;elem.find(".memoInfoDiv").children().each(function(a,d){if(d instanceof HTMLSpanElement){var text=$(d).text();switch(i++){case 0:obj.name=text.replace(/(\n| )/,"");obj.anony=!$(d).find("a").length;break;case 1:obj.update=new Date(/[0-9][-0-9]* [:0-9]*/.exec(text)[0]);break;case 2:if(obj.anony){obj.vote=parseInt(text.substr(text.indexOf("\ucd94\ucc9c:")+3));obj.unvote=parseInt(text.substr(text.indexOf("\ubc18\ub300:")+3))}else{obj.joindate=new Date(/[0-9][-0-9]*/.exec(text)[0]);obj.visit=parseInt(text.substr(text.indexOf("\ubc29\ubb38:")+3))}break;case 3:if(!obj.anony){obj.vote=parseInt(text.substr(text.indexOf("\ucd94\ucc9c:")+3));obj.unvote=parseInt(text.substr(text.indexOf("\ubc18\ub300:")+3))}break}}});return elem}function startCollect(){var lotteryCount=0,existEmail=false,filterType=0;do{lotteryCount=parseInt(prompt("\ucd94\ucca8\ud560 \uba85 \uc218\ub97c \uc785\ub825 \ud574 \uc8fc\uc138\uc694. (\uc22b\uc790\ub9cc\uc694!)"));if(isNaN(lotteryCount)){alert("\ucde8\uc18c\ub410\uc2b4\ub3e0");return}}while(!confirm(lotteryCount+"\uba85\uc774 \ub9de\ub098\uc694?"));existEmail=confirm("\uc774\uba54\uc77c \uc8fc\uc18c\uac00 \uc788\ub294 \ub300\uc0c1\ub9cc \ucd94\ucca8\ud560\uae4c\uc694?");if(confirm("\ub80c\ub364\uc73c\ub85c \ud560\uae4c\uc694?"))filterType="random";else if(confirm("\ucd94\ucc9c\uc218\uac00 \ub192\uc740 \uc21c\uc73c\ub85c \ud560\uae4c\uc694?"))filterType="vote";else if(confirm("\uac00\uc7a5 \ube68\ub9ac \uae00\uc744 \uc4f4 \uc0ac\ub78c\ubd80\ud130 \ud560\uae4c\uc694?"))filterType="newest";else{alert("\u3131- \uc6d0\ud558\ub294\uac8c \ubb61\ub2c8\uae4c.");return}var result=[];var target=existEmail?getEmails():getNormals();switch(filterType){case "random":for(var i=0;i<lotteryCount&&target.length>0;i++){var idx=parseInt(Math.random()*target.length);result.push(target[idx]);target.splice(idx,1)}break;case "vote":result=target.sort(function(a,b){return b[0].obj.vote-a[0].obj.vote});break;case "newest":result=target.sort(function(a,b){return+a[0].obj.update-+b[0].obj.update});break;case "join":}result.splice(lotteryCount,result.length-lotteryCount);$(".reports").remove();var dom=$("<div class='reports'>").css({position:"fixed",left:0,top:0,padding:10,background:"white",zIndex:1E12}).click(function(){$(this).remove()}).appendTo(document.body);var table=$("<table><tr><th>\uc774\ub984</th><th>\uc774\uba54\uc77c</th><th>\ucd94\ucc9c</th><th>\ubc29\ubb38</th></tr></table>");dom.append(table);if(result.length===0)table.append("<tr><td colspan='3'>\ub300\uc0c1\uc5c4\uc2b4\uc73c\ub85c \uc74c\uc2b4\uccb4</td></tr>");else $(result).each(function(i,d){var obj=d[0].obj;table.append("<tr><td>"+obj.name+"</td><td>"+obj.email+"</td><td>"+obj.vote+"</td><td>"+obj.visit+"</td></tr>")});console.log(result)}var intervalID=setInterval(function(){loadMoreReply()},100);var originNoMoreReplyPop=window.noMoreReplyPop;window.noMoreReplyPop=function(){console.log("\uc751?");if(intervalID){clearInterval(intervalID);intervalID=undefined;window.noMoreReplyPop=originNoMoreReplyPop;originNoMoreReplyPop();startCollect()}}})();
죄송합니다. 댓글 작성은 회원만 가능합니다.