Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
Completely rewritten to be less embarrassing and easier to maintain. To the uncaring end-user, it's just a bit faster and less likely to break. News under the hood include: caching in a single GM_value, caching the state of users without avatars as well to keep down traffic, re-caching avatars on onerror instead of by HEAD requests. |
|
|
Updated due to server changes ("Latest visitors" page URL changed). |
|
|
Updated due to server changes. |
|
|
Updated for new servers again. Userscripts complains it's not properly formatted (but it is, as far as I can tell, and it works), so get it here: http://henrik.nyh.se/greasemonkey/helgonavatars... |
|
|
Updated script for new servers. |
|
|
They changed image URLs again; script needs updating. Will do when I find the time... |
|
|
Added persistent cache through GM_setValue(). |
|
|
Johan: Not sure what you mean about the regexps. I see I had escaped a couple of forward slashes unnecessarily in a RegExp(), but what do you mean about string quoting backslashes? The only backslashes in my RegExp():s are for escaping things like ? (for a literal question mark) and . (for a literal full stop). If I double those backslashes, the script hangs. On a side note, I've modified the script to cache more persistently through GM_setValue instead of within the frameset, though I won't update it here until I've tested it a bit more. |
|
|
I added a scoop-up-incidental-avatar-URLs-seen bit today; it's just a line or two extra, marked "// register in cache" in my version. Your regexps probably don't do quite what you want them to, by the way -- if you use the "new RegExp('a regexp')" syntax, remember to string quote all occurrences of "\" (to "\\"). If you use the literal syntax, it's the "/"s you need to quote (to "\/"), and if you don't, there is no need to quote them at all. |
|
|
Johan: Cool, will check it out tomorrow. I have considered a cache, but I suppose you beat me to it. Updated again since Helgon changed avatar servers. :p |
|
|
Dang, were you updating it yesterday, too? :-] Oh, well - for what it's worth, I did a version that caches avatars rather than going astray to fetch them again and again every time, being a bit kinder on the helgon.net server (and speedy as a greased weasel. monkey. whatever :-). The (function(){...})(); encasing is performed internally since GreaseMonkey 0.3.3, and you might want to start splitting things up into functions for readability. :) Have a peek at my refactored version at http://www.lysator.liu.se/~jhs/userscript/www.h... for some inspiration. I couldn't resist tampering with it to do some other amusing things too, while playing. |
|
|
Updated: no longer reports visits when retrieving avatars. 125 new lines of code. :p |
|
|
Thanks! I've updated the script accordingly. A shame "for (foo in bar)" isn't reliable. I miss Python. ;) |
|
|
i tried changing the includes, but that was't the problem the problem was this line:
|
|
|
Hm, I debugged it a bit. I tried the purple color scheme (saw you use it, from your screenshots) and it worked fine. It did not work, however, when I logged in through http://helgon.net as opposed to http://www.helgon.net. I've now fixed the @include:s to work in both cases. Let me know if this solves your problem. |
|
|
Let me know how it works when you've tried it out more. I had a friend try it and it worked fine for him. |
|
|
though i can't get it working in my "Besökarlista". Actually, i haven't tried it anywhere else, so i can't say if it works at all. |
|
|
nice, i'm thinking about adding some scripts i wrote for helgon sometime soon. check em out :) |