|
|
On October 21 2014 01:07 Die4Ever wrote:Show nested quote +On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote:On October 21 2014 00:55 Cricketer12 wrote:On October 21 2014 00:53 SetGuitarsToKill wrote: [quote] I wouldn't say without even trying. We all know that foreigners can joke against vastly inferior opponents for no reason. Even Scarlett and Snute do it. we will see, but HuK Scarlett Snute, Bunny and MajOr should make blizzcon Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them Show nested quote +On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote:On October 21 2014 00:55 Cricketer12 wrote: [quote] we will see, but HuK Scarlett Snute, Bunny and MajOr should make blizzcon Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique LOL SO MUCH PASHUN!!!!!!
|
your Country52797 Posts
On October 21 2014 01:07 Die4Ever wrote:Show nested quote +On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote:On October 21 2014 00:55 Cricketer12 wrote:On October 21 2014 00:53 SetGuitarsToKill wrote: [quote] I wouldn't say without even trying. We all know that foreigners can joke against vastly inferior opponents for no reason. Even Scarlett and Snute do it. we will see, but HuK Scarlett Snute, Bunny and MajOr should make blizzcon Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them Show nested quote +On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote:On October 21 2014 00:55 Cricketer12 wrote: [quote] we will see, but HuK Scarlett Snute, Bunny and MajOr should make blizzcon Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique Characters are the real MVP here
|
HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!!
|
On October 21 2014 01:10 The_Templar wrote:Show nested quote +On October 21 2014 01:07 Die4Ever wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote:On October 21 2014 00:55 Cricketer12 wrote: [quote] we will see, but HuK Scarlett Snute, Bunny and MajOr should make blizzcon Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote: [quote] Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique Characters are the real MVP here yea, many OC characters
|
On October 21 2014 01:08 Cricketer12 wrote:Show nested quote +On October 21 2014 01:07 Die4Ever wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote:On October 21 2014 00:55 Cricketer12 wrote: [quote] we will see, but HuK Scarlett Snute, Bunny and MajOr should make blizzcon Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote: [quote] Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique LOL SO MUCH PASHUN!!!!!! one step from there to automated passion scary
|
On October 21 2014 01:10 dangthatsright wrote:Show nested quote +On October 21 2014 01:08 Cricketer12 wrote:On October 21 2014 01:07 Die4Ever wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote: [quote] Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:[quote] We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique LOL SO MUCH PASHUN!!!!!! one step from there to automated passion scary Define autopashun?
|
your Country52797 Posts
On October 21 2014 01:10 dangthatsright wrote:Show nested quote +On October 21 2014 01:08 Cricketer12 wrote:On October 21 2014 01:07 Die4Ever wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:On October 21 2014 00:56 OtherWorld wrote: [quote] Honestly I think we'll see at best 2 foreigners next year, and more likely only one (Snute or Bunny). We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:[quote] We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique LOL SO MUCH PASHUN!!!!!! one step from there to automated passion scary imagine if passion-board was automatically posted after every post AND passion boards were counted as posts
|
On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code
+ Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames')) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body').html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] '); if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href'); $.ajax({url:url,success:function(data) { console.log('\ngot '+url+' with '+data.length+' characters\n'); l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' '); if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257') return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482') { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]'); var numpics=0; pics.each(function(){ var src=$(this).attr('src'); if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player').length; videos+=post.find('a[href^="http://vimeo.com/"]').length; videos+=post.find('a[href^="https://vimeo.com/"]').length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('\nrunning stats...\n'); tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]').remove(); tbody.find('br').replaceWith(' '); counter=0; tbody.find('span.forummsginfo').each(function(){ counter++; if(window.hasOwnProperty('tempnames')==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)'); var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]').attr('href'); ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal') { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc') { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b]n[small]posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvids: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+'), chars: '+chars+' (+'+recentchars+'), exclamations: '+excls+' (+'+recentexcls+'), chars per post: '+Math.round(chars/posts)+' ('+cppchange+')[/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b] - posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvideos: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+')\n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE'); var na=MakeUser('NA'); var restoftheworld=MakeUser('Unimportant Parts of the World'); var unknown=MakeUser('Unknown Region'); for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico') { region=na; } else if(u.country=='') { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc') score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc') { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += '\n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += '\n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += '\n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'\n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += '\n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol
|
On October 21 2014 01:12 Die4Ever wrote:Show nested quote +On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code Show nested quote ++ Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames')) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body').html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] '); if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href'); $.ajax({url:url,success:function(data) { console.log('\ngot '+url+' with '+data.length+' characters\n'); l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' '); if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257') return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482') { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]'); var numpics=0; pics.each(function(){ var src=$(this).attr('src'); if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player').length; videos+=post.find('a[href^="http://vimeo.com/"]').length; videos+=post.find('a[href^="https://vimeo.com/"]').length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('\nrunning stats...\n'); tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]').remove(); tbody.find('br').replaceWith(' '); counter=0; tbody.find('span.forummsginfo').each(function(){ counter++; if(window.hasOwnProperty('tempnames')==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)'); var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]').attr('href'); ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal') { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc') { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b]n[small]posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvids: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+'), chars: '+chars+' (+'+recentchars+'), exclamations: '+excls+' (+'+recentexcls+'), chars per post: '+Math.round(chars/posts)+' ('+cppchange+')[/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b] - posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvideos: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+')\n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE'); var na=MakeUser('NA'); var restoftheworld=MakeUser('Unimportant Parts of the World'); var unknown=MakeUser('Unknown Region'); for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico') { region=na; } else if(u.country=='') { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc') score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc') { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += '\n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += '\n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += '\n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'\n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += '\n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol Hey, for someone who has no idea how to code, that's still pretty impressive and looks kind of time consuming
|
On October 21 2014 01:11 The_Templar wrote:Show nested quote +On October 21 2014 01:10 dangthatsright wrote:On October 21 2014 01:08 Cricketer12 wrote:On October 21 2014 01:07 Die4Ever wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote:On October 21 2014 00:57 The_Templar wrote:[quote] We'll see Naniwa at blizzcon next year  that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote: [quote] that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique LOL SO MUCH PASHUN!!!!!! one step from there to automated passion scary imagine if passion-board was automatically posted after every post AND passion boards were counted as posts I think people might become suspicious if my score is 100 times higher than everyone else's put together lol
|
your Country52797 Posts
On October 21 2014 01:12 Die4Ever wrote:Show nested quote +On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code Show nested quote ++ Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames' ) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body' .html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] ' ; if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href' ; $.ajax({url:url,success:function(data) { console.log('ngot '+url+' with '+data.length+' characters\n' ; l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' ' ; if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257' return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482' { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]' ; var numpics=0; pics.each(function(){ var src=$(this).attr('src' ; if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player' .length; videos+=post.find('a[href^="http://vimeo.com/"]' .length; videos+=post.find('a[href^="https://vimeo.com/"]' .length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('nrunning stats...\n' ; tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]' .remove(); tbody.find('br' .replaceWith(' ' ; counter=0; tbody.find('span.forummsginfo' .each(function(){ counter++; if(window.hasOwnProperty('tempnames' ==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)' ; var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]' .attr('href' ; ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "," ; }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal' { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc' { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+' [/b]n[small]posts: '+posts+' (+'+recentposts+' , ocposts: '+ocposts+' (+'+recentocposts+' , ocvids: '+ocvideos+' (+'+recentocvideos+' , pics: '+pics+' (+'+recentpics+' , chars: '+chars+' (+'+recentchars+' , exclamations: '+excls+' (+'+recentexcls+' , chars per post: '+Math.round(chars/posts)+' ('+cppchange+' [/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+' [/b] - posts: '+posts+' (+'+recentposts+' , ocposts: '+ocposts+' (+'+recentocposts+' , ocvideos: '+ocvideos+' (+'+recentocvideos+' , pics: '+pics+' (+'+recentpics+' \n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE' ; var na=MakeUser('NA' ; var restoftheworld=MakeUser('Unimportant Parts of the World' ; var unknown=MakeUser('Unknown Region' ; for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico' { region=na; } else if(u.country=='' { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc' score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc' { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += 'n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += 'n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += 'n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += 'n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol http://www.teamliquid.net/forum/sc2-tournaments/468614-wcs-global-finals-2014-day-1?page=47#930 It was like 5 lines when you started >.>
|
your Country52797 Posts
On October 21 2014 01:13 Die4Ever wrote:Show nested quote +On October 21 2014 01:11 The_Templar wrote:On October 21 2014 01:10 dangthatsright wrote:On October 21 2014 01:08 Cricketer12 wrote:On October 21 2014 01:07 Die4Ever wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote:On October 21 2014 00:58 Cricketer12 wrote: [quote] that would be awesome Cricketer, are you aiming at a top 3 finish? Seems legit In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote: [quote]
Cricketer, are you aiming at a top 3 finish? Seems legit
In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique LOL SO MUCH PASHUN!!!!!! one step from there to automated passion scary imagine if passion-board was automatically posted after every post AND passion boards were counted as posts I think people might become suspicious if my score is 100 times higher than everyone else's put together lol Only 100 times? You gotta think big. The number of posts you would have is 100 times higher than everyone else's put together
|
On October 21 2014 01:14 The_Templar wrote:Show nested quote +On October 21 2014 01:13 Die4Ever wrote:On October 21 2014 01:11 The_Templar wrote:On October 21 2014 01:10 dangthatsright wrote:On October 21 2014 01:08 Cricketer12 wrote:On October 21 2014 01:07 Die4Ever wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote:On October 21 2014 00:59 Sakat wrote: [quote]
Cricketer, are you aiming at a top 3 finish? Seems legit
In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar if I make it count the passionboards then it looks like this lol #1 Die4Ever - score: 769,158 (+89,601)posts: 435 (+0), ocposts: 35 (+3), ocvids: 29 (+6), pics: 101 (+0), chars: 1802007 (+142597), exclamations: 207 (+27), chars per post: 4143 (+280)#2 The_Templar - score: 81,248 (+1,274)posts: 2027 (+41), ocposts: 1 (+0), ocvids: 0 (+0), pics: 95 (+1), chars: 141558 (+2544), exclamations: 126 (+0), chars per post: 70 (-1)but part of that is because all the passionboards have hashtag IMadeThis in them On October 21 2014 01:06 The_Templar wrote:On October 21 2014 01:04 OtherWorld wrote:On October 21 2014 01:03 Cricketer12 wrote:On October 21 2014 01:01 The_Templar wrote: [quote] In the passion board ranking? He's the dark horse so that would be cool im aiming for second, temp cant be beat the way he is going, even second is super tricky cause die is killing me by being the father of pashunbroad, but yeah, i have high hopes The Passionboards posts don't count in Die's score, else he would be waaaaay over Templar Each of the recent posts has walls of text and 50+ pictures  the pictures don't count since they aren't unique LOL SO MUCH PASHUN!!!!!! one step from there to automated passion scary imagine if passion-board was automatically posted after every post AND passion boards were counted as posts I think people might become suspicious if my score is 100 times higher than everyone else's put together lol Only 100 times? You gotta think big. The number of posts you would have is 100 times higher than everyone else's put together more like 2.01 his original post plus a pashunbroad for every post made by someone else
|
On October 21 2014 01:14 The_Templar wrote:Show nested quote +On October 21 2014 01:12 Die4Ever wrote:On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code + Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames')) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body').html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] '); if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href'); $.ajax({url:url,success:function(data) { console.log('\ngot '+url+' with '+data.length+' characters\n'); l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' '); if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257') return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482') { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]'); var numpics=0; pics.each(function(){ var src=$(this).attr('src'); if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player').length; videos+=post.find('a[href^="http://vimeo.com/"]').length; videos+=post.find('a[href^="https://vimeo.com/"]').length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('\nrunning stats...\n'); tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]').remove(); tbody.find('br').replaceWith(' '); counter=0; tbody.find('span.forummsginfo').each(function(){ counter++; if(window.hasOwnProperty('tempnames')==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)'); var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]').attr('href'); ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal') { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc') { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b]n[small]posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvids: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+'), chars: '+chars+' (+'+recentchars+'), exclamations: '+excls+' (+'+recentexcls+'), chars per post: '+Math.round(chars/posts)+' ('+cppchange+')[/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b] - posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvideos: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+')\n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE'); var na=MakeUser('NA'); var restoftheworld=MakeUser('Unimportant Parts of the World'); var unknown=MakeUser('Unknown Region'); for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico') { region=na; } else if(u.country=='') { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc') score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc') { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += '\n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += '\n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += '\n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'\n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += '\n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol http://www.teamliquid.net/forum/sc2-tournaments/468614-wcs-global-finals-2014-day-1?page=47#930It was like 5 lines when you started >.> lol yea, that was very condensed, but several things made it grow a lot since then -once the thread passed 100 pages, it became more than 1 TL+ long page, so it has to load all the different pages now -OC content is counted and score separately -OC links are listed -only unique images are counted -images are listed -I rewrote it to be more modular and easier to change -the output formatting is prettier now
|
On October 21 2014 01:13 SetGuitarsToKill wrote:Show nested quote +On October 21 2014 01:12 Die4Ever wrote:On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code + Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames')) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body').html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] '); if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href'); $.ajax({url:url,success:function(data) { console.log('\ngot '+url+' with '+data.length+' characters\n'); l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' '); if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257') return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482') { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]'); var numpics=0; pics.each(function(){ var src=$(this).attr('src'); if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player').length; videos+=post.find('a[href^="http://vimeo.com/"]').length; videos+=post.find('a[href^="https://vimeo.com/"]').length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('\nrunning stats...\n'); tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]').remove(); tbody.find('br').replaceWith(' '); counter=0; tbody.find('span.forummsginfo').each(function(){ counter++; if(window.hasOwnProperty('tempnames')==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)'); var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]').attr('href'); ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal') { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc') { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b]n[small]posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvids: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+'), chars: '+chars+' (+'+recentchars+'), exclamations: '+excls+' (+'+recentexcls+'), chars per post: '+Math.round(chars/posts)+' ('+cppchange+')[/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b] - posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvideos: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+')\n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE'); var na=MakeUser('NA'); var restoftheworld=MakeUser('Unimportant Parts of the World'); var unknown=MakeUser('Unknown Region'); for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico') { region=na; } else if(u.country=='') { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc') score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc') { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += '\n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += '\n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += '\n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'\n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += '\n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol Hey, for someone who has no idea how to code, that's still pretty impressive and looks kind of time consuming
To me it looks like witchcraft
|
new undershirt hype, now i can sit in bed, be comfy AND clean
|
On October 21 2014 01:17 Sakat wrote:Show nested quote +On October 21 2014 01:13 SetGuitarsToKill wrote:On October 21 2014 01:12 Die4Ever wrote:On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code + Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames')) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body').html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] '); if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href'); $.ajax({url:url,success:function(data) { console.log('\ngot '+url+' with '+data.length+' characters\n'); l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' '); if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257') return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482') { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]'); var numpics=0; pics.each(function(){ var src=$(this).attr('src'); if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player').length; videos+=post.find('a[href^="http://vimeo.com/"]').length; videos+=post.find('a[href^="https://vimeo.com/"]').length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('\nrunning stats...\n'); tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]').remove(); tbody.find('br').replaceWith(' '); counter=0; tbody.find('span.forummsginfo').each(function(){ counter++; if(window.hasOwnProperty('tempnames')==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)'); var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]').attr('href'); ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal') { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc') { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b]n[small]posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvids: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+'), chars: '+chars+' (+'+recentchars+'), exclamations: '+excls+' (+'+recentexcls+'), chars per post: '+Math.round(chars/posts)+' ('+cppchange+')[/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b] - posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvideos: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+')\n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE'); var na=MakeUser('NA'); var restoftheworld=MakeUser('Unimportant Parts of the World'); var unknown=MakeUser('Unknown Region'); for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico') { region=na; } else if(u.country=='') { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc') score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc') { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += '\n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += '\n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += '\n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'\n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += '\n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol Hey, for someone who has no idea how to code, that's still pretty impressive and looks kind of time consuming To me it looks like witchcraft same lol
|
TL won't let me post pictures!! :'(
|
On October 21 2014 01:17 Sakat wrote:Show nested quote +On October 21 2014 01:13 SetGuitarsToKill wrote:On October 21 2014 01:12 Die4Ever wrote:On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code + Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames')) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body').html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] '); if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href'); $.ajax({url:url,success:function(data) { console.log('\ngot '+url+' with '+data.length+' characters\n'); l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' '); if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257') return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482') { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]'); var numpics=0; pics.each(function(){ var src=$(this).attr('src'); if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player').length; videos+=post.find('a[href^="http://vimeo.com/"]').length; videos+=post.find('a[href^="https://vimeo.com/"]').length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('\nrunning stats...\n'); tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]').remove(); tbody.find('br').replaceWith(' '); counter=0; tbody.find('span.forummsginfo').each(function(){ counter++; if(window.hasOwnProperty('tempnames')==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)'); var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]').attr('href'); ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal') { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc') { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b]n[small]posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvids: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+'), chars: '+chars+' (+'+recentchars+'), exclamations: '+excls+' (+'+recentexcls+'), chars per post: '+Math.round(chars/posts)+' ('+cppchange+')[/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+')[/b] - posts: '+posts+' (+'+recentposts+'), ocposts: '+ocposts+' (+'+recentocposts+'), ocvideos: '+ocvideos+' (+'+recentocvideos+'), pics: '+pics+' (+'+recentpics+')\n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE'); var na=MakeUser('NA'); var restoftheworld=MakeUser('Unimportant Parts of the World'); var unknown=MakeUser('Unknown Region'); for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico') { region=na; } else if(u.country=='') { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc') score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc') { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += '\n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += '\n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += '\n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'\n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += '\n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol Hey, for someone who has no idea how to code, that's still pretty impressive and looks kind of time consuming To me it looks like witchcraft
Should we burn him?
|
your Country52797 Posts
On October 21 2014 01:17 Die4Ever wrote:Show nested quote +On October 21 2014 01:14 The_Templar wrote:On October 21 2014 01:12 Die4Ever wrote:On October 21 2014 01:10 Sakat wrote: HOW DO YOU FIND THE TIME???!!!!!! It's amazing work!!! it's really not that much code + Show Spoiler + var names={}; if(window.hasOwnProperty('tempnames' ) names=tempnames;
var namesa=[]; var counter=0; var oclinks=[]; var piclinks=[]; var links={};
if(links.length==0) RunStats();
var tbody=$($('body' .html()); RunStats(6);
function CheckLinks() { var links = $('body > #navwrapper:nth-child(1) #main-content > table:nth-child(2) tbody tr:nth-child(1) td:nth-child(2) a:not([title^="Next Page"] :not([rel="nofollow"] ' ; if(links.length==0) { OutputStats(); return; } var l=$(links[0] ; var url=l.attr('href' ; $.ajax({url:url,success:function(data) { console.log('ngot '+url+' with '+data.length+' characters\n' ; l.remove(); tbody=$(data); RunStats(0); CheckLinks(); }}); } CheckLinks(); counter=0;
function MakeContentType() { return {posts:0,chars:0,pics:0,excls:0,videos:0}; }
function MakeUser(name) { return {name:name,score:0,recentscore:0,country:'',types:{ normal:MakeContentType(),oc:MakeContentType(),recentnormal:MakeContentType(),recentoc:MakeContentType() }}; }
function ProcessPost(user, country, date, hours_ago, post, postlink) { var posttext=post.text(); posttext.replace(/\s+/g,' ' ; if(posttext.match(/^\s*\#PASSIONBOARD4EVER/)) return; if(postlink=='http://www.teamliquid.net/forum/viewpost.php?post_id=23071257' return;
var contenttype='normal'; var isoc=false; if(posttext.match(/\#IMadeThis/i) && postlink!='http://www.teamliquid.net/forum/viewpost.php?post_id=23135482' { isoc=true; contenttype='oc'; var summary=posttext.substr(0,195); if(summary.length>=193) summary=summary.substr(0,190)+'...'; oclinks.push({user:user,link:postlink,summary:summary,date:date}); } if(hours_ago<12) contenttype='recent'+contenttype;
var chars=posttext.length; var pics=post.find('img[src^="http"]' ; var numpics=0; pics.each(function(){ var src=$(this).attr('src' ; if( links.hasOwnProperty(src) ) { links[src]++; return; } links[src]=1; numpics++; if(isoc==false) { piclinks.push({user:user,link:postlink,src:src,date:date}); } }); var videos=post.find('iframe.youtube-player' .length; videos+=post.find('a[href^="http://vimeo.com/"]' .length; videos+=post.find('a[href^="https://vimeo.com/"]' .length; var excls=0; try{excls=Math.min(10,posttext.match(/\!/g).length);}catch(e){} if(!names[user] names[user]=MakeUser(user); var n=names[user]; n.country=country; var cont=n.types[contenttype]; cont.posts++; cont.chars+=chars; cont.pics+=numpics; cont.excls+=excls; cont.videos+=videos; }
function RunStats(start) { console.log('nrunning stats...\n' ; tbody.find('.quote,.submessage:not(a[title="Link to this post"] ,.forumsig,div[style="float:right; font-size:8pt; margin-top:15px"]' .remove(); tbody.find('br' .replaceWith(' ' ; counter=0; tbody.find('span.forummsginfo' .each(function(){ counter++; if(window.hasOwnProperty('tempnames' ==false && counter<=start) return; var msginfotext=$(this).text(); var country=''; try{country=msginfotext.match(/^\s+\S+\s+([a-zA-Z][^\.]+).*$/)[1];}catch(e){} var datetext=msginfotext.match(/\.\s*(([a-zA-Z]+) [^\.]*)/)[1]; var date; if(datetext.match(/Posts/) ) { country=''; datetext=msginfotext.match(/\S+\s*(([a-zA-Z]+) [^\.]*)/)[1]; date=new Date(datetext); } else date=new Date(datetext); var hours_ago=((new Date())-date)/1000/3600; var user=msginfotext.match(/^\s*(\S*).*$/)[1]; var post=$(this).parent().parent().parent().find('tr > .forumPost:not(lightback)' ; var postlink='http://www.teamliquid.net'+$(this).parent().parent().find('a.submessage[title="Link to this post"]' .attr('href' ; ProcessPost(user, country, date, hours_ago, post, postlink); }); }
function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "," ; }
function OutputUserStats(u,place,details) { var out=''; if(place>0) out+='[b]#'+place+' '; else out+='[b]'; var name=u.name; var ut=u.types; var score=Math.floor(u.score); var recentscore=Math.floor(u.recentscore); var posts=0; var ocposts=0; var videos=0; var ocvideos=0; var pics=0; var chars=0; var excls=0; var recentpics=0; var recentchars=0; var recentexcls=0; for(var t in ut) { if(!ut.hasOwnProperty(t)) continue; if(t=='normal' || t=='recentnormal' { posts+=ut[t].posts; videos+=ut[t].videos; } else { ocposts+=ut[t].posts; ocvideos+=ut[t].videos; } if(t=='recentnormal' || t=='recentoc' { recentpics+=ut[t].pics; recentchars+=ut[t].chars; recentexcls+=ut[t].excls; } pics+=ut[t].pics; chars+=ut[t].chars; excls+=ut[t].excls; } var recentposts=ut.recentnormal.posts; var recentocposts=ut.recentoc.posts; var recentocvideos=ut.recentoc.videos; var cppchange=(chars/(posts+ocposts)) - ((chars-recentchars)/((posts+ocposts)-(recentposts+recentocposts))); if(posts-recentposts==0) cppchange=(chars/posts); cppchange=Math.floor(cppchange); if(cppchange>0) cppchange='+'+cppchange; if(cppchange!=cppchange)cppchange='0'; if(details==1) { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+' [/b]n[small]posts: '+posts+' (+'+recentposts+' , ocposts: '+ocposts+' (+'+recentocposts+' , ocvids: '+ocvideos+' (+'+recentocvideos+' , pics: '+pics+' (+'+recentpics+' , chars: '+chars+' (+'+recentchars+' , exclamations: '+excls+' (+'+recentexcls+' , chars per post: '+Math.round(chars/posts)+' ('+cppchange+' [/small]n'; } else { out+='[dblue]'+name+'[/dblue] - score: '+numberWithCommas(score)+' (+'+numberWithCommas(recentscore)+' [/b] - posts: '+posts+' (+'+recentposts+' , ocposts: '+ocposts+' (+'+recentocposts+' , ocvideos: '+ocvideos+' (+'+recentocvideos+' , pics: '+pics+' (+'+recentpics+' \n'; } return out; }
function OutputStats() { var out=''; namesa=[]; var everyone=MakeUser('EVERYONE' ; var na=MakeUser('NA' ; var restoftheworld=MakeUser('Unimportant Parts of the World' ; var unknown=MakeUser('Unknown Region' ; for(var i in names) { if(!names.hasOwnProperty(i)) continue; var u=names[i]; var region=restoftheworld; if(u.country=='United States' || u.country=='Canada' || u.country=='Greenland' || u.country=='Mexico' { region=na; } else if(u.country=='' { region=unknown; }
for(var t in u.types) { var c=u.types[t]; var score=0; var ec=everyone.types[t]; var rc=region.types[t]; ec.videos+=c.videos; ec.pics+=c.pics; ec.posts+=c.posts; ec.chars+=c.chars; ec.excls+=c.excls; rc.videos+=c.videos; rc.pics+=c.pics; rc.posts+=c.posts; rc.chars+=c.chars; rc.excls+=c.excls;
if(t=='oc' || t=='recentoc' score=c.videos*3000+c.pics*200+c.posts*100+c.chars/2+c.excls/10; else score=c.pics*200+c.posts*20+c.videos*10+c.chars/10+c.excls/10; u.score+=score; everyone.score+=score; region.score+=score; if(t=='recentnormal' || t=='recentoc' { u.recentscore+=score; everyone.recentscore+=score; region.recentscore+=score; } } namesa.push(u); } namesa.push(everyone); namesa.sort(function(a,b){ return b.score-a.score; }); oclinks.sort(function(a,b){ //return a.date-b.date; return b.date-a.date; }); piclinks.sort(function(a,b){ return b.date-a.date; });
//console.log(namesa); var spoilerlist=''; out=''; out += 'n[center][big][b]#PASSIONBOARD4EVER[/b][/big]n\n'; for(var i in namesa) { if(i==21) break; var place=i; var u=namesa[i]; out += OutputUserStats(u,place,0); } out += '[spoiler=More Details]n'; out += OutputUserStats(na,0,1); out += OutputUserStats(restoftheworld,0,1); out += 'n'; for(var i in namesa) { var place=i; var u=namesa[i]; out += OutputUserStats(u,place,1); } out += '[/spoiler]n\n'; out += '[/center]'; out += 'score = (ocvideos*3000) + (pics*200) + (ocposts*100) + (posts*20) + (videos*10) + (oc-characters/2) + (characters/10) + (exclamation points/10); (max of 10 exclamation points per post, the first 6 posts don\'t count and my #PASSIONBOARD4EVER posts don\'t count, the + and - stats is for the past 12 hours)\nso post more pics and make some videos, and make sure to use #IMadeThis when appropriate! But be careful to not use #IMadeThis in normal posts, you should say hashtag IMadeThis instead, or put it inside of a quote tag.'; out += 'n\n[center][big][b]Latest #IMadeThis Posts[/b][/big]n'; for(var i in oclinks) { if(i==5) out += '[spoiler=More #IMadeThis Posts]'; out += '[url='+oclinks[i].link+'][b][dblue]'+oclinks[i].user+'[/dblue][/b] '+ oclinks[i].date.toDateString() +'[/url] - '+oclinks[i].summary+'n\n'; } out += '[/spoiler]n\nIf you made something (fanfic/article/song/lyrics/video, not a photoshop) then your post should be here, edit it to add in #IMadeThis. If you think your post shouldn\'t be here then edit it out or change it.'; out += 'n\n[spoiler=Most Recent 50 Pictures]'; for(var i in piclinks) { if(i>=50) break; var p=piclinks[i]; out += '[img]'+p.src+'[/img]n[url='+p.link+']Posted by '+p.user+' on [date]'+p.date+'[/date][/url]n\n'; } out += 'This list does not include pictures from posts with #IMadeThis.[/spoiler]'; out += '[/center]'; console.log(out); }
almost forgot, gotta quote it lol http://www.teamliquid.net/forum/sc2-tournaments/468614-wcs-global-finals-2014-day-1?page=47#930It was like 5 lines when you started >.> lol yea, that was very condensed, but several things made it grow a lot since then - once the thread passed 100 pages, it became more than 1 TL+ long page, so it has to load all the different pages now -OC content is counted and score separately -OC links are listed -only unique images are counted -images are listed -I rewrote it to be more modular and easier to change -the output formatting is prettier now Good thing I gave you TL+ then
|
|
|
|