Levelranks greasemonkey script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anubis2003
    FFR Veteran
    • Sep 2005
    • 84

    #1

    Levelranks greasemonkey script

    I don't know if I'm the only one, but I love the song list filter in the velocity engine and miss it when looking at my levelranks. I finally spent a little time and put together a simple greasemonkey script to add filters to levelranks.

    I've only tested it in Firefox, but I see no reason why it shouldn't work in Chrome.

    As an example for what it can do, here I'm viewing all my non-AAAs on difficulty 1-44 files that I've only played once. I like this sort of list because it shows me some songs I should be able to easily improve my scores on.


    Basic syntax for each of the filters is '<X' to filter out scores that have X or higher for that field; '>X' to filter out scores that have X or lower for that field; and 'X' or '=X' to only show scores that have exactly X for that field.

    You can grab it over at github and can see the code as well.

    I hope you find it useful!
  • Arkuski
    FFR Veteran
    • Jul 2006
    • 1118

    #2
    Re: Levelranks greasemonkey script

    dope

    Originally posted by Wayward Vagabond
    i can appreciate a good looking woman when i see one and this one just happened to be my mom

    Comment

    • Silvuh
      quit
      FFR Simfile Author
      FFR Music Producer
      • Apr 2005
      • 938

      #3
      Re: Levelranks greasemonkey script

      I don't know how many people are actually using this (and if you aren't, I'd highly suggest doing so), but I have a fix for anyone who hasn't figured it out yet. Don't know a thing about javascript, but it just now occurred to me I could just look up what I need to know.

      The trouble is here in line 36:
      Code:
      range.min = range.max = rangeText.charAt(0) == '=' ? rangeText.substring(1) : rangeText;
      The minimum and maximum being the same won't return anything, so I found out how to increment a string and came up with
      Code:
          } else if (rangeText.charAt(0) == '=') {
             (range.min = (parseInt(rangeText.substring(1), 10) -1)) &&
             (range.max = (parseInt(rangeText.substring(1), 10) +1));
          } else {
             (range.min = (parseInt(rangeText.substring(0), 10) -1)) &&
             (range.max = (parseInt(rangeText.substring(0), 10) +1));
             }
      The latter half adds the ability to type in just the number to return matches, as mentioned in the OP. Replace lines 35 through 37 with this code, and it will work.

      Comment

      • ryuyasha
        Rhythm is Magic
        • Feb 2005
        • 670

        #4
        Re: Levelranks greasemonkey script

        I have not looked at the actual code in detail yet, but does the <1 refer to your rank on a song? First I thought it was the difficulty, so I was gonna point out that it would only return non-AAAs from 2-44.

        Looks cool though, I will probably be playing with this and modifying it. I had not thought to just use Greasemonkey, mostly because I have never used it in the past. My solution was going to be to write an external program that could parse level ranks from the page and display those in different ways.

        If anyone is interested in different ways of filtering data it seems here would be a good place to mention it.

        Originally posted by psychoangel691
        No matter what tournament you play it's likely you're going to come across something you don't like or are very bad at. If you want to get into the competitive side of FFR you need to learn how to deal with and overcome these songs/charts.

        Comment

        Working...