userscripts.org Favourites
Allows you to put your favourite user scripts into a dropdown menu integrated with the site's main menu. It shows useful information about each script, including when it was last updated.
The script replaces the "Add to favorites" link under "view script source" to add/remove the script to your favourites. A dropdown menu containing the favourites appears next to the "Scripts" link in the header.
In the dropdown, the items first appear in chronological order (i.e. the order in which they were added to your favourites). You can then sort them using the links at the top. Clicking the same one reverses sorting direction and the script remembers the sorting type. You can also change the title by double-clicking it.
Next to each item, the number of comments (c), installs (i) and the time of last update (u) are shown. The script updates this information when it is run 30 minutes after the last update (i.e. it won't update every 30m without a page refresh). The tooltip for each item's link shows the time & date it was added.
If you update the script (by clicking "Install Script" on the right) your current favourites will be kept.
Update 27 May 2008: Fixed a few bugs mostly due to site changes. linkType 2 works again and a "Refresh" link to refresh the stats has been added next to the sorting links.
Update 23 March 2008: Favourites are now saved when updating the script. Script now works if logged in or not.
Update 15 March 2008: Added ability to sort by author. This just means that scripts written by you will appear at the top/bottom. Also, scripts written by you are in italics. Fixed comment-adding to reflect site changes.
Update 4 March 2008: Minor CSS change to make it work in Firefox 3.
Update 17 November: You can now edit the title of the item in the list by double-clicking it. Normal clicks still follow the links as usual. You can also set the title to get automatically truncated using the truncateTo variable at the top of the script. Currently it is set at 70 and will truncate long titles, adding a trailing ellipsis (...).
Screenshots
Not added to favourites, favourites not open:

Added to favourites, favourites open:

You could comment on this script if you were logged in.
55 comments
You could comment on this script if you were logged in.

login to vote
I need to add
z-index:9999;to#favouritesas style to get I above the metadata.login to vote
compressed the css
login to vote
I'm aware that the comments counter is broken after the update to the comments system. I'll fix it when I have time.
login to vote
I guess, thnx anyways. Still loving your script.
login to vote
OK, done.
That must have been a caching issue of some sort. Odd.
login to vote
It cases trouble when a script injects an iframe into the window and there are a few useful userscripts here who do (including one of mine).
Beside, it's an easy fix :p
For the second problem, I restarted my browser just before and the problem disappeared.
login to vote
I don't understand - why would that be necessary? I can't find any instance when the header is not present.
As for the second problem, I can't reproduce that. I have a number of script that have not been updated since they were first uploaded and u: always shows the first uploaded time. The script already uses the "First uploaded" time - lines 111 and 322.
login to vote
Thats great news, thnx.
I've a little suggestion:
change lines 163 and 164 to something like this:
var navitems = document.getElementById('header'); if (!navitems) return; navitems = navitems.getElementsByTagName('li'); if (!navitems) return;This prevents errors with other scripts.Another problem I came across, was times/dates with scripts like this one; they don't have a "Last updated" time/date. The result is that it always show like this: "u: 12 h ago" and almost every time shows on top when sorted. The solution is to use the first uploaded time (until the "Last updated" is added). I hope you understand my problem and you can fix it.
login to vote
Thanks jerone, I found the error: I was using "First Updated" instead of "First updated". Tiny mistake!
Script has been updated.
login to vote
Hello Raffles,
Every time I click "Refresh" I'm getting the following error in Firebug:
It goes the same for these script numbers: 12497, 3548, 9726, 3412, 30490, 675, 1641.
Can't find any matches between these scripts, but maybe you know what happens.
I've got 41 scripts favourited atm.
Also I've got some small space between the 'Favourites' word and the popuped div. I've fixed it by chancing
top: 1.7emtotop: 18px.I don't know if anyone else get these errors too?!
ps. I can't recreate the previous problem and forget about that translation suggestion, you made a good point.
login to vote
Real nice. I wish the 50 faves I had added before this script could somehow be transferred. But I know that's asking too much. Great job tho this is a must have!
login to vote
I've added a small feature: if a script has new comments (i.e. a different number from last time), one of these (ยป) is displayed before the number of comments.
login to vote
Do you mean that it goes into some other order, different to the order you had them in before pressing "Refresh"? That doesn't happen to me, the order stays as it it, and it should, because the list items are not moved or removed at all, only the elements inside each are changed.
As for multiple languages, I find it curious that you would want that, as the rest of the site is in English. Wouldn't it clash horribly? Something I'd rather tackle first is the synchronisation with the site's system.
login to vote
Still loving your script.
Only comment I have that when I press "refresh" the list below doesn't reorder when I have them sorted on "last update". To fix this the list should be reordered when refreshing is finished.
Do you've got plans in making this script multi-language?
If yes, maybe my script (US_language) would be interesting for you then and I would like to contribute a Dutch translation.
gr J
login to vote
Thanks for the fix! I love the famfamfam icons :)
login to vote
Thanks for pointing that out, Gollum. I've updated it to accommodate scripts that haven't been updated and only have a "First uploaded" date.
lastupdated = xpath('//div[@id="right"]/h6[contains(text(), "Last updated") or contains(text(), "First uploaded")]/following-sibling::p/text()', true)login to vote
I also use Update scripts, shifting "Favourites" leftward. Which meant editing the css for the
#favouritescontainer toleft:-17em;Not asking you to do anything to your script, but it may help others who find the left edge of "Favourites" guillotined .
login to vote
Raffles, great to hear that. Thanks for your time.
login to vote
Script page (h6) header can now be Last updated + First uploaded or just First uploaded. If the latter then script falls over with xpath error.
EDIT: ...script now updated.
login to vote
jeton: Like I said, my system is completely separate. That is why there are different numbers for each system.
Now that I think about it, I think synchronisation would be a good idea. I'll work on it when I have time.
login to vote
Here's a screenshot explaining the issue:
http://dl.getdropbox.com/u/4639/usrscrfav.gif
On nr.1 userscripts.org shows that i have 11 favorite scripts. On nr.2 your script displays only 7.
Is your scripts "syncing" with the userscripts.org favorites or it works on it's own?
If so, could you make it sync? :)
login to vote
Cheers jerone, should be working again.
login to vote
Ok, I tested a bit and found out that it only is when linkType is set to 2 (which i prefer).
p.s. Don't forget to update your update list above.
login to vote
Thanks for the update.
I will test this at home. At work all is OK, but I didn't have updated the script.
login to vote
As requested by jerone, I've added a "Refresh" link, next to the sorting links. You can tell when it's refreshing and when it's finished. While it's refreshing the stats, clicking the link again does nothing.