<div><span style="font-size:18px;font-weight:bold;line-height:normal;">내</span><span style="font-size:18px;font-weight:bold;line-height:normal;">가 내가 오유 추첨기를 들고 와쪄여!!!!!!!</span></div><a target="_blank" href="http://www.todayhumor.co.kr/board/view.php?table=bestofbest&no=170073&s_no=170073&kind=bestofbest_sort&page=1&o_table=programmer" target="_blank">http://www.todayhumor.co.kr/board/view.php?table=bestofbest&no=170073&s_no=170073&kind=bestofbest_sort&page=1&o_table=programmer</a> <div><br></div> <div><br></div> <div>↑</div> <div><br></div> <div>지난 베오베를 보다가</div> <div><br></div> <div>이사람이 추첨기를 만든걸 봤는데 공개를 안했길레 괘씸해서 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ</div> <div><br></div> <div>이번엔 제가 만들어봤습니다!!!</div> <div><br></div> <div><br></div> <div>Javascript로요 ㅋㅋ</div> <div><br></div> <div><br></div> <div><br></div> <div>우선 코드는 이렇습니다. 해보고 싶은 분은 Ctrl+C를 해보세요.</div> <div><br></div> <div><br></div> <div><code style="font-family:'Lucida Sans Typewriter', 'Courier New', Courier, Fixed, monospace;line-height:normal;white-space:pre-wrap;background:#555555;">(function(){function getEmails(){var emailChecker=/[0-9a-zA-Z][_0-9a-zA-Z-]*@<wbr>[_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+){1,2}$/;<wbr>var result=[];$(".memoContainerDiv").each(fu<wbr>nction(i,d){var items=$(d).find(".memoContentDiv").text(<wbr>).split(/(\n| )/);for(var j=0;j<items.length;j++)if(emailChecker.t<wbr>est(items[j]))result.push(setupInfomatio<wbr>n(d))});return result}function getNormals(){var result=[];$(".memoContainerDiv").each(fu<wbr>nction(i,d){result.push(setupInfomation(<wbr>d))});return result}function setupInfomation(elem){var obj=elem.obj={};elem=$(elem);var i=0;elem.find(".memoInfoDiv").children()<wbr>.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;<wbr>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.s<wbr>ubstr(text.indexOf("\ucd94\ucc9c:")+3));<wbr>obj.unvote=parseInt(text.substr(text.ind<wbr>exOf("\ubc18\ub300:")+3))}else{obj.joind<wbr>ate=new Date(/[0-9][-0-9]*/.exec(text)[0]);obj.visit=parseInt(text.substr(text.inde<wbr>xOf("\ubc29\ubb38:")+3))}break;case 3:if(!obj.anony){obj.vote=parseInt(text.<wbr>substr(text.indexOf("\ucd94\ucc9c:")+3))<wbr>;obj.unvote=parseInt(text.substr(text.in<wbr>dexOf("\ubc18\ub300:")+3))}break}}});ret<wbr>urn elem}function startCollect(){var lotteryCount=0,existEmail=false,filterTy<wbr>pe=0;do{lotteryCount=parseInt(prompt("\u<wbr>cd94\ucca8\ud560 \uba85 \uc218\ub97c \uc785\ub825 \ud574 \uc8fc\uc138\uc694. (\uc22b\uc790\ub9cc\uc694!)"));if(isNaN(<wbr>lotteryCount)){alert("\ucde8\uc18c\ub410<wbr>\uc2b4\ub3e0");return}}while(!confirm(lotteryCount+"\ub<wbr>a85\uc774 \ub9de\ub098\uc694?"));existEmail=confir<wbr>m("\uc774\uba54\uc77c \uc8fc\uc18c\uac00 \uc788\ub294 \ub300\uc0c1\ub9cc \ucd94\ucca8\ud560\uae4c\uc694?");if(con<wbr>firm("\ub80c\ub364\uc73c\ub85c \ud560\uae4c\uc694?"))filterType="random<wbr>";else if(confirm("\ucd94\ucc9c\uc218\uac00 \ub192\uc740 \uc21c\uc73c\ub85c \ud560\uae4c\uc694?"))filterType="vote";<wbr>else if(confirm("\uac00\uc7a5 \ube68\ub9ac \uae00\uc744 \uc4f4 \uc0ac\ub78c\ubd80\ud130 \ud560\uae4c\uc694?"))filterType=<code class="prettyprint lang-js" style="font-family:'Lucida Sans Typewriter', 'Courier New', Courier, Fixed, monospace;line-height:normal;white-space:pre-wrap;">"newest";else{alert("\u3131- \uc6d0\ud558\ub294\uac8c \ubb61\ub2c8\uae4c.");return}var result=[];var target=existEmail?getEmails():getNormals<wbr>();switch(filterType){case "random":for(var i=0;i<lotteryCount&&target.length>0;i++)<wbr>{var idx=parseInt(Math.random()*target.length<wbr>);result.push(target[idx]);target.splice<wbr>(idx,1)}break;case "vote":result=target.sort(function(a,b){<wbr>return b[0].obj.vote-a[0].obj.vote});break;case "newest":result=target.sort(function(a,b<wbr>){return+a[0].obj.update-+b[0].obj.updat<wbr>e});break;case "join":}result.splice(lotteryCount,resul<wbr>t.length-lotteryCount);$(".reports").rem<wbr>ove();var dom=$("<div class='reports'>").css({position:"fixed"<wbr>,left:0,top:0,padding:10,background:"whi<wbr>te",zIndex:1E12}).click(function(){$(thi<wbr>s).remove()}).appendTo(document.body);va<wbr>r table=$("<table><tr><th>\uc774\ub984</th<wbr>><th>\uc774\uba54\uc77c</th><th>\ucd94\u<wbr>cc9c</th><th>\ubc29\ubb38</th></tr></tab<wbr>le>");dom.append(table);if(result.length<wbr>===0)table.append("<tr><td colspan='3'>\ub300\uc0c1\uc5c4\uc2b4\uc7<wbr>3c\ub85c \uc74c\uc2b4\uccb4</td></tr>");else $(result).each(function(i,d){var obj=d[0].obj;table.append("<tr><td>"+obj<wbr>.name+"</td><td>"+obj.email+"</td><td>"+<wbr>obj.vote+"</td><td>"+obj.visit+"</td></t<wbr>r>")});console.log(result)}var intervalID=setInterval(function(){loadMo<wbr>reReply()},100);var originNoMoreReplyPop=window.noMoreReplyP<wbr>op;window.noMoreReplyPop=function(){cons<wbr>ole.log("\uc751?");if(intervalID){clearI<wbr>nterval(intervalID);intervalID=undefined<wbr>;window.noMoreReplyPop=originNoMoreReply<wbr>Pop;originNoMoreReplyPop();startCollect(<wbr>)}}})();</code></code> </div> <div><code class="prettyprint lang-js" style="font-family:'Lucida Sans Typewriter', 'Courier New', Courier, Fixed, monospace;line-height:normal;white-space:pre-wrap;"><br></code></div> <div><br></div> <div><br></div> <div> <div style="text-align:left;"><img src="http://thimg.todayhumor.co.kr/upfile/201410/1413201365zP6q4k1g2aYLkm8GtxICHDcppbEb76.jpg" width="800" height="630" alt="1.jpg" class="chimg_photo" style="border:none;"></div> <div style="text-align:left;"><br></div> <div style="text-align:left;"><img src="http://thimg.todayhumor.co.kr/upfile/201410/1413201368WVv1DFnjRPFCvZ2CWgkyjnKtvw73RsQW.jpg" width="800" height="630" alt="2.jpg" class="chimg_photo" style="border:none;"></div> <div style="text-align:left;"><br></div> <div style="text-align:left;"><img src="http://thimg.todayhumor.co.kr/upfile/201410/1413201371ZDELBAJklRKTGlZNLyYV.jpg" width="800" height="630" alt="3.jpg" class="chimg_photo" style="border:none;"></div> <div style="text-align:left;"><br></div> <div style="text-align:left;"><img src="http://thimg.todayhumor.co.kr/upfile/201410/1413201373nsUdXSt5pjCwxPdYDLzjElGgwLU6c.jpg" width="800" height="630" alt="4.jpg" class="chimg_photo" style="border:none;"></div> <div style="text-align:left;"><br></div> <div style="text-align:left;"><img src="http://thimg.todayhumor.co.kr/upfile/201410/1413201375nSSQTYSHLlRQcaUdjI45mS.jpg" width="800" height="630" alt="5.jpg" class="chimg_photo" style="border:none;"></div><br></div> <div><br></div> <div><br></div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.