Play statistics v2.0

 
    • Alan71 sa...
    • Användare
    • 21 jul 2008, 10:30

    Play statistics v2.0

    I rewrote the last.fm play statistics in order for it to work on the new last.fm.

    Screenshot maestro!



    I might rework it a little bit. I've done it at full speed at work so...

    Download link: here

    • Bloopy sa...
    • Forum Moderator
    • 21 jul 2008, 11:48
    Not bad for a start! But yeah, it could do with a rework. It would be great if it matched the font of the stats to the left: "28,965 plays since 25 Sep 2005".

  • Thanks for the effort! I'll add this one tomorrow.

    Like Bloopy, though, I do think the section looks a bit off. I think maybe it's too in-your-face and might look better with a reduced font-size and weight.

    • RoBz88 sa...
    • Användare
    • 21 jul 2008, 15:37
    Good job but I preferred the simple approach that the old version took...

    “I didn’t mean to kill nobody,I just meant to shoot the sonofabitch in the head. Him dying was between him and the Lord.” - R.L. Burnside
    • iriebob sa...
    • Abonnent
    • 21 jul 2008, 19:55
    The placing at the right will probably clash with counter resets and longish user-homepage urls. I've hacked the lastfmplaystatistics yesterday and tried another approach for the layout. Also not perfect, but more modest in appearance. Link

    LucidCognition, the latest maintainer, seems to be unavailable. Therefore I think it's ok if Alan71 is doing an update release.

    • Alan71 sa...
    • Användare
    • 21 jul 2008, 21:52
    I didn't had time to take a deeper look in it tonight, even if it'll be really easy to fix, i.e. reduce font-size + color (+ probably remove the border on the floating div). I'll try to change those things either tomorrow or the day after tomorrow.

    I'll also add the "on reset feature" soon. On thursday probably.

    @iriebob: do you have a user name where it might be problematic? I think that place those stats like I did might be slightly better since profile's pages are already quite long. That's a nice job that you've done though.

    @spacefish: it might be a good idea to wait before "releasing" it and place it in the overview of the group since all the feature aren't implemented yet. And my code is not commented for the moment.

    @all: any idea of other stats that might be useful?

  • Let me know when it's ready for release then. It won't go on the overview until it is.

    Generally, I'd recommend refraining from posting before you're ready to release the script. There is simply too much involved for me to add scripts to the overview then try to remember which ones I need to announce (because they're ready) and which ones I don't (because they're not). If you post it here, it's presumed ready for prime time.

    • Arthurrr sa...
    • Användare
    • 22 jul 2008, 07:49
    Good script :)
    Any chance to edit it so it would use my custom date instead of the date of my registration?

    • Alan71 sa...
    • Användare
    • 22 jul 2008, 10:00
    That would need a per-user configuration. Possible though. But I think your need is quite specific, isn't it?

    • Alan71 sa...
    • Användare
    • 22 jul 2008, 10:41

    Update!

    I changed the css of the div (gimme feedback plz) and added the "on reset" feature (try it with this user Char0n for instance).

    This script now uses my library. So, it can be configured in your settings.

    It does not work on i18n versions of the website, but the previous one didn't worked too. I might do something about it (not this week).

    New screenshot (the conf):


    Download link: here

    • RoBz88 sa...
    • Användare
    • 22 jul 2008, 12:38
    Looks a lot better :)
    The only improvement I could suggest is try to get the numbers aligned with each other. Also I don't think 3 places of decimal precision isn't necessary but I think a lot of users could change this to there personal preferences themselves.

    “I didn’t mean to kill nobody,I just meant to shoot the sonofabitch in the head. Him dying was between him and the Lord.” - R.L. Burnside
    • Alan71 sa...
    • Användare
    • 22 jul 2008, 13:12
    I'll think about the alignment. Might be done quickly.
    Nice suggestion for the precision. I might had an entry in the pref so that the user can set the precision he wants (0 to 5).

    • one3rd sa...
    • Användare
    • 22 jul 2008, 14:03
    Just a minor grammatical issue. The proper past tense of the verb "reset" is "reset," not "reseted."

    • Alan71 sa...
    • Användare
    • 22 jul 2008, 15:06

    Update 2.1.1

    @one3rd: thx, fixed

    DL : here

    • _Tarkus_ sa...
    • Användare
    • 22 jul 2008, 18:06
    I love it! Finally, something useful for that blank space, and it looks great too. I too wish I could reduce the decimals to one or two, though.

    Thanks for the update!

    • Bloopy sa...
    • Forum Moderator
    • 22 jul 2008, 20:30
    To change the decimals, go to edit the script, find the bits that say .toFixed(3) and change the numbers to however many decimals you want.

    • marshee sa...
    • Användare
    • 22 jul 2008, 21:48
    it´s not working for my profile page and I can´t find why... it works for other pages.

    • _Tarkus_ sa...
    • Användare
    • 22 jul 2008, 22:21
    Bloopy said:
    To change the decimals, go to edit the script, find the bits that say .toFixed(3) and change the numbers to however many decimals you want.

    Thanks, I actually went to 3, 2, 1, 0, 0 for now. :)

    marshee said:
    it´s not working for my profile page and I can´t find why... it works for other pages.

    FYI, it works fine on your profile for me.

    • Alan71 sa...
    • Användare
    • 22 jul 2008, 23:41
    @marshee works fine on mine too. anything special on your computer? Any relevant entry in the error console?

    @_Tarkus_: thx :)
    I'll update the script to add this parameter to the conf. I (and probably other people) like to see the tiny decimals increasing over the day.

    whoo, nice show tonight

    • marshee sa...
    • Användare
    • 23 jul 2008, 00:50
    The only thing I have related to a script is this
    if (line) {
    var err = this.findError(script, line - lineFinder.lineNumber - 1);
    GM_logError(
    e, // error obj
    0, // 0 = error (1 = warning)
    err.uri,
    err.lineNumber
    );
    } else {
    GM_logError(
    e, // error obj
    0, // 0 = error (1 = warning)
    script.fileURL,
    0
    );
    }
    }
    }
    return true; // did not need a (function() {...})() enclosure.
    },


    with the
    if (line) {
    highlighted in the script when I clack the error in the console.

  • Don't forget to say when this one's ready to be released. ;)

    • Alan71 sa...
    • Användare
    • 23 jul 2008, 05:52
    @marshee: Tools > Error Console, can you copy/paste the item (right-click on it)? The line number does not tell anything with greasemonkey scripts.

    @spacefish: np. I'll tell you tonight.

    • Bloopy sa...
    • Forum Moderator
    • 23 jul 2008, 06:04
    iriebob said:
    The placing at the right will probably clash with counter resets and longish user-homepage urls. I've hacked the lastfmplaystatistics yesterday and tried another approach for the layout. Also not perfect, but more modest in appearance. Link
    Your modification is much more to my liking! I've just made minor edits: reversed the order and reduced the amount of decimals.

    So it pushes things down a bit, but doesn't bother me. Last.fm actually allows avatars to be taller on profile pages anyway.

    • Alan71 sa...
    • Användare
    • 23 jul 2008, 15:32

    V2.2

    Text-alignment has been changed for the figures
    A new configuration item appeared in the settings' tab : you can now change the precision (default 2)

    DL: here

    @spacefish: you can publish it

  • Thanks for adding the precision config! Will add tomorrow.

Anonyma användare kan inte skriva inlägg. Vänligen logga in eller skapa ett konto för att göra inlägg i forumen.