Jump to content

Madstats - Free Browser Extension For Stats Sorting


269 replies to this topic

#221 Widowmaker1981

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • The Widow Maker
  • The Widow Maker
  • 5,031 posts
  • LocationAt the other end of the pretty lights.

Posted 14 March 2016 - 10:22 AM

Noticing that (L) mechs dont seem to show in stats, specifically the Executioner-C (L)

#222 el piromaniaco

    Member

  • PipPipPipPipPipPipPip
  • Bad Company
  • Bad Company
  • 959 posts
  • LocationVienna

Posted 05 April 2016 - 03:51 AM

View PostWidowmaker1981, on 14 March 2016 - 10:22 AM, said:

Noticing that (L) mechs dont seem to show in stats, specifically the Executioner-C (L)

Just found out about the (L)s too while i was lookiing for my ZEU-9S2(L).

#223 HUBA

    Member

  • PipPipPipPipPipPip
  • 481 posts

Posted 06 April 2016 - 09:59 AM

Nice tool, how far is the Firefox version?

inspired by this I made the lightweight Firefox version Posted Image just copy this into the address field (make sure the javascript: don't get eaten) and save it as bookmark (select the URL from the address field and drag it to the link bar works fine)

javascript:void(
!function($,d){
  "use strict";
  if ($.isFunction($.fn.DataTable)) return;
  var h = d.getElementsByTagName("head")[0];
  var st = d.createElement('link');
  st.href="//cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css";
  st.rel="stylesheet";
  st.type="text/css";
  h.appendChild(st);
  var sc = d.createElement('script');
  sc.onload=function(){($('.table-striped').addClass('compact').DataTable({"paging":false}));};
  sc.src="//cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js";
  h.appendChild(sc);
  var x = d.createElement('style');
  var t = d.createTextNode('table.dataTable tbody tr {background-color: #111;}');
  x.appendChild(t);
  h.appendChild(x);
}(jQuery,document)
)


Edit: Thanks to MadLibrarian here also the tablesorter version... we will getting there Posted Image

javascript:void(
!function($,d){
  "use strict";
  if ($.isFunction($.fn.tablesorter)) return;
  $('.table-striped td:contains(" day")').html(function(i,t){
   var h = parseInt(t.substr(t.indexOf('day')+4)) + parseInt(t)*24;
   h = h+t.substr(t.indexOf(':'));
   return '<i style="display:none">'+h+'</i>'+t;
  });
  var h = d.getElementsByTagName("head")[0];
  var st = d.createElement('link');
  st.href="//mottie.github.io/tablesorter/css/theme.black-ice.css";
  st.rel="stylesheet";
  st.type="text/css";
  h.appendChild(st);
  var sc = d.createElement('script');
  sc.onload=function(){
$('.table-striped').tablesorter({
sortList: [[0,0]],
sortInitialOrder: 'desc',
theme:'blackice',
widgets: ['stickyHeaders', 'filter'],
widgetOptions: {
  stickyHeaders_offset : 63,
  stickyHeaders_addResizeEvent : false,
  stickyHeaders_zIndex : 1000002,
  filter_startsWith : true,
  filter_reset :'#resetBtn'
}
});  
  };
  sc.src="//mottie.github.io/tablesorter/dist/js/jquery.tablesorter.combined.min.js";
  h.appendChild(sc);
}(jQuery,document)
)

Edited by HUBA, 14 April 2016 - 06:34 PM.


#224 OznerpaG

    Member

  • PipPipPipPipPipPipPip
  • The Bludgeon
  • The Bludgeon
  • 977 posts
  • LocationToronto, Canada

Posted 06 April 2016 - 03:59 PM

wow, nice work HUBA! thanks!

Edited by JagdFlanker, 06 April 2016 - 05:47 PM.


#225 MadLibrarian

    Member

  • PipPipPipPipPipPip
  • Urban Commando
  • Urban Commando
  • 334 posts
  • Twitter: Link
  • Twitch: Link
  • LocationYou Essay

Posted 12 April 2016 - 01:51 PM

Alright, sorry again for my absence. I'm going to try to get out an update soon-ish. Intending to restore the (L) mechs, that were apparently not actually just duplicates after all. Posted Image I think the (G) and (I) mechs still are, right? Also, the Arrow isn't fixed? I'll check the data and update the packs that I've missed and everything up to what is announced.

What else am I missing? Any other ideas?

It is becoming obvious that I should be setting stuff up so it can stay up to date without me having to dig into the code and spending hours. If I invested the time into making it all load from a community managed spreadsheet, would you help keep it up to date? I made a proof of concept once before, so I know it can be done pretty easily if anyone is interested.

View PostHUBA, on 06 April 2016 - 09:59 AM, said:

Sent a PM to you Huba. Good stuff.

If you or anyone wants to use the same styling and magic table features as madstats, you can load in the jquery tablesorter plugin the same way. (jquery.tablesorter.combined.min.js) Here's the init options from madstats. There are other changes done in the code beforehand, so I'm not sure how much more code is necessary for everything to work.

I might update this post later as I dig back into the code. Feel free to dig into it as well. With the exception of libraries, all my code is plain js. Fair warning though, it isn't very pretty. It is still partially based off old code and somewhat craptastic in places. I have a completely different structure in progress for the next major version that is redone so I can keep up a Firefox extension from the same code base. (If I ever get around to finishing it. [and even better if firefox ever finishes their webextensions support])
Spoiler

Edited by MadLibrarian, 12 April 2016 - 02:24 PM.


#226 MadLibrarian

    Member

  • PipPipPipPipPipPip
  • Urban Commando
  • Urban Commando
  • 334 posts
  • Twitter: Link
  • Twitch: Link
  • LocationYou Essay

Posted 12 April 2016 - 02:13 PM

View PostNerclid, on 08 March 2016 - 10:38 AM, said:

Any way to add a Win/Loss ratio to the base stats page? Is this something I can do myself, or it is even possible?


Doable and easy. I'll try to get it into the next update. Thanks for the suggestion! :)

Edited by MadLibrarian, 12 April 2016 - 02:21 PM.


#227 MadLibrarian

    Member

  • PipPipPipPipPipPip
  • Urban Commando
  • Urban Commando
  • 334 posts
  • Twitter: Link
  • Twitch: Link
  • LocationYou Essay

Posted 13 April 2016 - 04:47 PM

Okay, so update coming out but I am not sure if the hiding duplicates code is really correct again. I removed the L mechs from manual hiding, but they still get parsed through without the L in the actual table.

I had been hiding I, G, R, S, O, and L mechs manually as being always duplicates. With all these single chassis packs it might not be the best idea anymore.

So quick question: Should I bother hiding any duplicates at all? Just I and G? Some other combination?

Also, is "THE ARROW" listed this way in the mech page by default? The data seems right ("THE ARROW" : { "mech" : "BLACKJACK", "sig" : "BJ1-A" }), and it doesn't seem to be getting parsed improperly, so I'm not really sure why it wouldn't be working at this point. (Its probably in the unowned list though.)

#228 OznerpaG

    Member

  • PipPipPipPipPipPipPip
  • The Bludgeon
  • The Bludgeon
  • 977 posts
  • LocationToronto, Canada

Posted 13 April 2016 - 04:52 PM

hiding duplicates is nice, but not a huge deal - whatever's easier for you

#229 Wintersdark

    Member

  • PipPipPipPipPipPipPipPipPipPipPip
  • 13,375 posts
  • Google+: Link
  • Twitter: Link
  • LocationCalgary, AB

Posted 13 April 2016 - 05:19 PM

View PostMorggo, on 05 February 2016 - 06:36 AM, said:

Ahhhh, makes sense!

Well, I'll give chrome a thought this weekend then, might give it a try on a spare machine to get at the stats.

Cheers!
you can install chrome alongside IE if you want, it's not like you can only have one browser at a time.

#230 BiggoB

    Member

  • PipPipPip
  • 78 posts

Posted 13 April 2016 - 06:27 PM

View PostMadLibrarian, on 13 April 2016 - 04:47 PM, said:

Okay, so update coming out but I am not sure if the hiding duplicates code is really correct again. I removed the L mechs from manual hiding, but they still get parsed through without the L in the actual table.

I had been hiding I, G, R, S, O, and L mechs manually as being always duplicates. With all these single chassis packs it might not be the best idea anymore.

So quick question: Should I bother hiding any duplicates at all? Just I and G? Some other combination?

Also, is "THE ARROW" listed this way in the mech page by default? The data seems right ("THE ARROW" : { "mech" : "BLACKJACK", "sig" : "BJ1-A" }), and it doesn't seem to be getting parsed improperly, so I'm not really sure why it wouldn't be working at this point. (Its probably in the unowned list though.)



hi,

yes the arrow looks like that:
THE ARROW

i can check it when you upload the new version. it shows up as owned and unowned so i'm not sure which one is wrong Posted Image

looking forward to see the new version.

the problem with the (L) mechs:
some are unique and some are duplicate:
ATLAS AS7-S(L)
CENTURION CN9-AH(L)
KING CRAB KGC-000(L)

unique:

CICADA CDA-3F(L)
WOLVERINE WVR-7D(L)
ZEUS ZEU-9S2(L)
NOVA NVA-D(L)
EXECUTIONER EXE-C(L)

cheers

BiggoB

Edited by BiggoB, 13 April 2016 - 06:28 PM.


#231 MadLibrarian

    Member

  • PipPipPipPipPipPip
  • Urban Commando
  • Urban Commando
  • 334 posts
  • Twitter: Link
  • Twitch: Link
  • LocationYou Essay

Posted 13 April 2016 - 06:38 PM

View PostBiggoB, on 13 April 2016 - 06:27 PM, said:



hi,

yes the arrow looks like that:
THE ARROW

i can check it when you upload the new version. it shows up as owned and unowned so i'm not sure which one is wrong Posted Image

looking forward to see the new version.

the problem with the (L) mechs:
some are unique and some are duplicate:
ATLAS AS7-S(L)
CENTURION CN9-AH(L)
KING CRAB KGC-000(L)

unique:

CICADA CDA-3F(L)
WOLVERINE WVR-7D(L)
ZEUS ZEU-9S2(L)
NOVA NVA-D(L)
EXECUTIONER EXE-C(L)

cheers

BiggoB



Awesome. That's exactly what I needed. Thank you.

Now they won't be removed, but are still getting their L's trimmed. It's a bit of a mess really, because I have to match designations with what is presented on the profile page. So long as those unique ones mentioned all behave like my KGC and WVR (smushing an L onto the end of the designation on the profile page) it seems like my current compromise will be good enough. It will at least give people a way to view the stats if it is messed up.

Stay tuned for that update, I'm about to click the button. Thanks for the help!

#232 BiggoB

    Member

  • PipPipPip
  • 78 posts

Posted 13 April 2016 - 07:40 PM

hi,

still the same.
version is .46

arrow is unowned
all (L) mechs not visible Posted Image

Edited by BiggoB, 13 April 2016 - 07:41 PM.


#233 MadLibrarian

    Member

  • PipPipPipPipPipPip
  • Urban Commando
  • Urban Commando
  • 334 posts
  • Twitter: Link
  • Twitch: Link
  • LocationYou Essay

Posted 13 April 2016 - 08:59 PM

View PostBiggoB, on 13 April 2016 - 07:40 PM, said:

hi,

still the same.
version is .46

arrow is unowned
all (L) mechs not visible Posted Image

The Ls should just be getting trimmed, or rather, I'm keeping the duplicate row that doesn't have the L.
There's a new option for toggling duplicates too. I'll get back to it later.

Edited by MadLibrarian, 13 April 2016 - 08:59 PM.


#234 BiggoB

    Member

  • PipPipPip
  • 78 posts

Posted 14 April 2016 - 04:55 AM

good morning MadLibrarian,

maybe i wasn't clear enough the unique (L) mechs are gone the duplicates are visible and without the (L)
e.g.
ATLAS AS7-S


one question when you update the owned mechs do you get them from the profile page where i see all my mechs with the nice pictures?
BJ-A

Posted Image
THE ARROW

this is how it is visible there. BJ-A on top and "THE ARROW" bottom.

cheers

BiggoB

#235 MadLibrarian

    Member

  • PipPipPipPipPipPip
  • Urban Commando
  • Urban Commando
  • 334 posts
  • Twitter: Link
  • Twitch: Link
  • LocationYou Essay

Posted 14 April 2016 - 12:32 PM

View PostBiggoB, on 14 April 2016 - 04:55 AM, said:

good morning MadLibrarian,

maybe i wasn't clear enough the unique (L) mechs are gone the duplicates are visible and without the (L)
e.g.
ATLAS AS7-S


one question when you update the owned mechs do you get them from the profile page where i see all my mechs with the nice pictures?
BJ-A

Posted Image
THE ARROW

this is how it is visible there. BJ-A on top and "THE ARROW" bottom.

cheers

BiggoB


Sweet. Well that explains the Arrow. A typo. :/ Can't believe I glossed over it yesterday, it was staring me in face. Posted Image

It's looking like the L mechs aren't all dealt with the same way, like you said. Unfortunately they don't seem to be consistent within the groupings either. I'll dig into the code and see if I can find a better way to parse them and differentiate better.

Also, yes the updates are done on the profile page and on the mech page after a test to see if it is necessary.

Edited by MadLibrarian, 14 April 2016 - 12:34 PM.


#236 MadLibrarian

    Member

  • PipPipPipPipPipPip
  • Urban Commando
  • Urban Commando
  • 334 posts
  • Twitter: Link
  • Twitch: Link
  • LocationYou Essay

Posted 14 April 2016 - 04:16 PM

Also, stealth update fixing the arrow, flipping the default for duplicates, and an attempt at making all the L mechs display appropriately.

Also, apparently the domain host I was using crashed or died somehow. I switched it to http://madstats.is-great.net I haven't updated all of the linked stuff yet though, so there might still be broken links. :/

Thanks for your patience.

Edited by MadLibrarian, 14 April 2016 - 04:17 PM.


#237 HUBA

    Member

  • PipPipPipPipPipPip
  • 481 posts

Posted 14 April 2016 - 05:33 PM

Thanks to MadLibrarian the lightversion gets better and bigger Posted Image

In FireFox just copy all into the address field and make sure that javascript: is still there (I use strg+a, x, strg+v, pos1, del to save it) then drag the URL into the link bar to create a bookmark of the script. By clicking the bookmark it should prettify the tables (BTW it works with the last challenge/event too)

javascript:void(
!function($,d){
  "use strict";
  if ($.isFunction($.fn.tablesorter)) return;
    $('.table-striped tbody tr:has(th)').wrap('<thead></thead>');
    $('.table-striped tbody thead').insertBefore($('.table-striped tbody'));
  $('.table-striped td:contains(" day")').html(function(i,t){
   var h = parseInt(t.substr(t.indexOf('day')+4)) + parseInt(t)*24;
   h = h+t.substr(t.indexOf(':'));
   return '<i style="display:none">'+h+'</i>'+t;
  });
  var h = d.getElementsByTagName("head")[0];
  var st = d.createElement('link');
  st.href="//mottie.github.io/tablesorter/css/theme.black-ice.css";
  st.rel="stylesheet";
  st.type="text/css";
  h.appendChild(st);
  var sc = d.createElement('script');
  sc.onload=function(){
$('.table-striped').tablesorter({
sortList: [[0,0]],
sortInitialOrder: 'desc',
theme:'blackice',
widgets: ['stickyHeaders', 'filter'],
widgetOptions: {
  stickyHeaders_offset : 63,
  stickyHeaders_addResizeEvent : false,
  stickyHeaders_zIndex : 1000002,
  filter_startsWith : true,
  filter_reset :'#resetBtn'
}
});   
  };
  sc.src="//mottie.github.io/tablesorter/dist/js/jquery.tablesorter.combined.min.js";
  h.appendChild(sc);
}(jQuery,document)
)

Edited by HUBA, 14 April 2016 - 05:38 PM.


#238 BiggoB

    Member

  • PipPipPip
  • 78 posts

Posted 15 April 2016 - 05:04 AM

View PostMadLibrarian, on 14 April 2016 - 04:16 PM, said:

Also, stealth update fixing the arrow, flipping the default for duplicates, and an attempt at making all the L mechs display appropriately.

Also, apparently the domain host I was using crashed or died somehow. I switched it to http://madstats.is-great.net I haven't updated all of the linked stuff yet though, so there might still be broken links. :/

Thanks for your patience.



hey good morning/afternoon/evening,

new version looks very good now i like it.

what is see: ATLAS AS7-S(L) 18 11 5 2.20 15 8 1.88 6,426 36,957 02:20:03 2053 0.83 0.44 357 BLACKJACK BJ-1 27 13 12 1.08 18 17 1.06 8,321 41,022 02:57:02 1519 0.67 0.63 308 CENTURION CN9-AH(L) 33 17 16 1.06 35 22 1.59 10,572 64,751 03:52:53 1962 1.06 0.67 320
unowned now like the table above but the king crab is not there. :)

owned is showing the CN9-AH and the ATLAS AS7-S which is sweet.
king crab is showing as both 000 and 000(L)

the "unique" (L) variants are visible in owned and no filter which is fine.

i'm good with the no filter showing all even duplicates might make it easier for you.


awesome work!

cheers

BiggoB

#239 el piromaniaco

    Member

  • PipPipPipPipPipPipPip
  • Bad Company
  • Bad Company
  • 959 posts
  • LocationVienna

Posted 15 April 2016 - 09:21 PM

Thanks for the update!

#240 Panzermagistratus

    Member

  • PipPip
  • The Patron
  • 26 posts

Posted 30 May 2016 - 06:44 AM

Praise the sun?





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users