Play statistics v2.0

 
    • Alan71 disse...
    • Usuário
    • Jul 21 2008, 10h30

    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 disse...
    • Forum Moderator
    • Jul 21 2008, 11h48
    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 disse...
    • Usuário
    • Jul 21 2008, 15h37
    Good job but I preferred the simple approach that the old version took...

    • iriebob disse...
    • Usuário
    • Jul 21 2008, 19h55
    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 disse...
    • Usuário
    • Jul 21 2008, 21h52
    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 disse...
    • Usuário
    • Jul 22 2008, 7h49
    Good script :)
    Any chance to edit it so it would use my custom date instead of the date of my registration?

    • Alan71 disse...
    • Usuário
    • Jul 22 2008, 10h00
    That would need a per-user configuration. Possible though. But I think your need is quite specific, isn't it?

    • Alan71 disse...
    • Usuário
    • Jul 22 2008, 10h41

    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 disse...
    • Usuário
    • Jul 22 2008, 12h38
    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.

    • Alan71 disse...
    • Usuário
    • Jul 22 2008, 13h12
    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 disse...
    • Usuário
    • Jul 22 2008, 14h03
    Just a minor grammatical issue. The proper past tense of the verb "reset" is "reset," not "reseted."

    • Alan71 disse...
    • Usuário
    • Jul 22 2008, 15h06

    Update 2.1.1

    @one3rd: thx, fixed

    DL : here

    • _Tarkus_ disse...
    • Usuário
    • Jul 22 2008, 18h06
    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 disse...
    • Forum Moderator
    • Jul 22 2008, 20h30
    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 disse...
    • Usuário
    • Jul 22 2008, 21h48
    it´s not working for my profile page and I can´t find why... it works for other pages.

    • _Tarkus_ disse...
    • Usuário
    • Jul 22 2008, 22h21
    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 disse...
    • Usuário
    • Jul 22 2008, 23h41
    @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 disse...
    • Usuário
    • Jul 23 2008, 0h50
    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 disse...
    • Usuário
    • Jul 23 2008, 5h52
    @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 disse...
    • Forum Moderator
    • Jul 23 2008, 6h04
    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 disse...
    • Usuário
    • Jul 23 2008, 15h32

    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.

Usuários anônimos não podem postar mensagens. É preciso fazer login ou criar uma conta para postar nos fóruns.