nameandnature: Giles from Buffy (Default)

I’ve updated the little script I wrote to keep track of which comments are new on LJ and Dreamwidth (LJ now does this automatically in its default style, DW doesn’t, by the looks of it). Thanks to various people for telling me it was broken for HTTPS sites, which LJ and DW both default to these days.

Userscripts.org is long dead, so I’m now hosting it on my site.


Originally posted at Name and Nature. You can comment there. There are currently comments.
nameandnature: Giles from Buffy (Default)

I’ve updated the little script I wrote to keep track of which comments are new on LJ and Dreamwidth (LJ now does this automatically in its default style, DW doesn’t, by the looks of it). Thanks to sally_maria for alerting me to both the problem and the solution.

Userscripts.org is long dead, so I’m now hosting it on my site.


Originally posted at Name and Nature. You can comment there. There are currently comments.
nameandnature: Giles from Buffy (Default)
I've just updated LJ New Comments, the Firefox extension which remembers which comments you've read on LiveJournal or Dreamwidth and allows you to find new comments easily. It'll now remember comments on syndicated journals (that is, those which are actually feeds from external sites).
nameandnature: Giles from Buffy (Default)
I've produced a new version of LJ New Comments which works with Dreamwidth again: looks like they changed how comments are marked up at some point.
nameandnature: (jc)
Though I value its role in motivating LJ to be less stupid, I have not yet accepted Dreamwidth as my personal saviour. However, seeing as a lot of people have and one of them asked me about it, I've updated LJ New Comments to support it.
nameandnature: Giles from Buffy (Default)
I've updated LJ New Comments, my LJ add-on which remembers which comments on entries you've seen and helps you navigate to new comments. This update makes it work with the journals under the independentminds.livejournal.com domain, which are owned by The Independent newspaper.
nameandnature: Giles from Buffy (watching you)
For you Firefox users, I've put a new version of LJ New Comments up.

It supports Russian keyboards, courtesy of some code from [livejournal.com profile] mumi_0.

I've also made it expand collapsed comments when you move to them by pressing the "n" or "p" keys, as my assumption when you do that is that you want to read the comment. The thread expansion stuff needs the style to have an "Expand" link for the comment (literally, a link to the thread with the text "Expand": if anyone's got any ideas on how to identify it in a way which doesn't assume it's labelled in English, let me know).

Comments/questions to the entry for the script.
nameandnature: Giles from Buffy (Default)
I've updated the LJ New Comments script so that it's a lot faster at marking comments as new. While following the recent shitstorms in [livejournal.com profile] news, in which hundreds of angry LJ users are laying into the management, Firefox would seize up for a while and eventually warn me that the script was refusing to let go. Hopefully, the new version fixes that.

I've also changed the behaviour of the "NEW" link on new comments, so that clicking it now selects that comment. I think this makes more sense than taking you to the next new comment, as previous versions did, as I like to click to select the comment and then use the "n" and "p" keys to navigate.

Comments to the entry for the script, please.
nameandnature: Giles from Buffy (serious business)
So, Facebook have opened up their site to allow third parties to do stuff, namely put stuff on consenting users' profiles, stick items in the feed, and embed an interface to a third-party site inside Facebook. I eagerly await:I'm quite faint with excitement.

But srsly, this is an interesting ploy for world domination by Facebook. Why bother starting your new knitting, kitten appreciation or dating site if you can start one within Facebook and make use of (I'm fighting the urge to use the word "leverage" here, Dawkins help me) their existing users? You do need somewhere to host your application, which might mean big hosting bills if it became popular, but if you're not writing something which needs lots of state available on the network, it looks like you could also do interesting things from the user's desktop, or even from their browser with things like Greasemonkey scripts or browser add-ons.

Personally, I'm interested in online CDC Top Trumps. A port of that 100 Million Spiders thing looks like a win, too: it'd be funny, and some I noticed that some members of Facebook are already complaining that they can't put "Alice is in a dom-sub poly pirate-ninja conglomerate with Bob and Eve" on their profile using Facebook's existing relationship options (they're complaining by forming a Facebook group, naturally).

Finally, CNN's in-depth report on the changes solves the mystery of what Facebook's "poke" function is for. Apparently It even still has a feature which enables you to "poke" another member - something most people interpret to mean a sexual come-on. So now you know. Lord knows how you interpret the sort of poke war that lots of Facebook users get into.
nameandnature: Giles from Buffy (Default)
I've just updated LJ New Comments, fixing a bug pointed out by [livejournal.com profile] legolas and adding some code to make it try harder to draw a box around the currently selected comment (turns out I'd had the latter sitting around in my CVS repository without letting the public benefit).

While we're on the subject of Greasemonkey, InYOFaceBook is an amusing hack to show full size profile images when you mouse over a small one, even for people who've been boring enough to hide their full profile. Hurrah for Stalkerbook!
nameandnature: Giles from Buffy (kaylee shiny)
Just uploaded another version of the LJ New Comments script. This one never displays negative numbers of new comments ("-3 new") next to your friends' entries. I also noticed that Firefox was getting fat and slow after much LJ browsing. Turns out that Firefox leaks memory like a sieve when you do the thing that the script does to let you click from one new comment to the next. This is Firefox's fault, but luckily a way to get around this was discussed on the Greasemonkey mailing list recently. So I did that. All seems well so far. FF1.5 is so leaky that it'll probably get fat for some other reason, but with the amount of LJ I read I've probably helped myself a bit.

It occurs to me that the same sort of tricks LJ New Comments uses to find comments could probably also be used to make a version of the LJ Thread Unfolder which worked with more than just the default comment style. I might do that if I get around to it.
nameandnature: Giles from Buffy (Default)
The LJ New Comments script now copes better with the bewildering variety of journal styles that are out there. I also stopped it from giving up in disgust if a style allows it to see the comments but doesn't provide a permanent link to each comment, as the "n" and "p" keys will still work in these styles (q.v. [livejournal.com profile] peacerose's journal, for example).

I'm now using scrollIntoView to move each new comment to the top as you click or press keys, so you don't get a new history entry for each comment you visit (I was annoyed with having to hit the "Back" button multiple times to leave the entry). The docs for Greasemonkey allege that scrollIntoView doesn't work within Greasemonkey unless you do special stuff, but I seem to be getting away with it. Possibly I've broken the script for people not using Firefox 1.5, but such people need to feel the white heat of technology, anyway.

Ph34r my sk1llz!

ETA: Except that I broke it again trying to make it handle all the extra ways of denoting comments. v0.4, now on the userscripts.org site, seems to be working.
nameandnature: Giles from Buffy (giles)
I've finally got around to writing the Greasemonkey script which I've long been threatening.

What it does

The script remembers which comments you've seen on LJ (or Dreamwidth) and helps you navigate to new comments. That's right, I'm finally dragging LiveJournal kicking and screaming into the 1980s.

If you're on an entry page, pressing "n" skips you to the next new comment, and "p" skips to the previous one. If the style has an "Expand" link, moving to an unexpanded comment with these keys will also expand the thread. If the style has a permanent link or a reply link for each comment in that comment's header or footer, the script inserts another link next to it, labelled "NEW". That link shows you that the comment is new at a glance. Clicking the "NEW" link selects the comment so that pressing "n" will go to the next comment from there. On some styles, the currently selected comment will be outlined with a dotted line.

On a journal or friends page, the script will also add the number of new comments to the link text, so that, say, "15 comments" becomes "15 comments (10 new)", and enable the "n" and "p" keys to move between entries which have new comments, and the "Enter" key to view the selected entry. This only works if you're looking at a journal which adds "nc=N" to entry links to say there are N comments on an entry (LJ can do this as a trick to confuse your browser's history function into thinking you've not visited that entry whenever there are new comments). If you want to turn this on for your journal then ensure you're logged in, visit this page, check the box which says "Add &nc=xx to comment URLs" and hit the "Save" button.

How it works

You don't need to understand this section to use the script. If you don't care about programming, skip to the next part.

Gory details )

Using it

If you want to use it, you will need:

After you've installed all of the above, visit an entry on LJ or Dreamwidth and marvel at the "NEW" links on all the new comments (which will be all of them at this point, as the script wasn't around previously to remember which ones you'd seen before). See above for operating instructions.

Privacy

Note that the script stores a Firefox preference key for each journal entry you visit, listing the IDs of the comments it finds there. The script doesn't let the database grow without limit: when the script has seen 500 entries, it starts to drop the history for the entries you've not visited recently.

Clearing the browser's history doesn't affect the script's list of visited entries. Thus your visits to polybdsmfurries will be recorded for posterity, even if you clear the browser's history. You can wipe the entire history by using the "Manage User Scripts" entry on the Tools menu to delete the script and its associated preferences (you can re-install it afterwards, but you must clear out the preferences for it to delete the history).

The script does not record the contents of any entry or comment. The script does not transmit any information to LJ or any other website, it merely acts on what it sees when you request journal entries.

Your questions

This entry is intended to serve as a repository for questions about the script, so if you've got a question, comment here. I prefer this to commenting on my other entries or to emailing me, unless you already know me. Ta.

To keep up to date with new releases of my greasemonkey scripts, track the tag "greasemonkey" on my journal. This link should enable you to subscribe to that tag and get notified when I post a new entry about greasemonkey scripts.

Revision history

2006-01-02, version 0.1: First version.

2006-01-03, version 0.2: Added the "p" key. Used javascript to move between comments so doing so does not pollute the browser's history. Coped with the id=ljcmtNNNN way of marking comments. Made "n" and "p" keys work even in the absence of permalinks on each comment.

2006-01-04, version 0.3: Apparently you can have id=tNNNN, too.

2006-01-04, version 0.4: Broke 0.3, fixed it again. I hope.

2006-01-19, version 0.5: Updated to cope with LJ's new URL formats. Changed how comments are stored internally so that the database does not grow without limit: the script now remembers comments for the last 500 entries you visited, and forgets the entries you've visited least. Also added "New" marker based on reply link as well as thread link, for styles which don't have a thread link for every comment.

2006-01-19, version 0.6: Convert dashes I find in URLs to underscores internally, to preserve access to history from older versions of the script before LJ's URL change.

2006-02-09, version 0.7: Work around the fact that Firefox leaks memory like a sieve. Never display negative number of new comments. Change licence to MIT as GPL is overkill for this script.

2006-02-09, version 0.8: There was a bug in the workaround code I got off the Greasemonkey mailing list. Fixed that.

2006-06-04, version 0.9: Enabled the "n" and "p" keys on the friends/journal view. Added the box around the current comment.

2007-02-20, version 1.0, baby: Try harder to draw a box around the current new comment. Applied [livejournal.com profile] legolas's fix for pressing CTRL at same time as the N or P keys (see comments).

2008-03-31, version 1.1: Make it work faster on entries with lots of comments. Altered behaviour of "NEW" link so it now selects the comment you're clicking on, as that makes more sense.

2008-09-24, version 1.2: Support Russian keyboards thanks to [livejournal.com profile] mumi_0, make threads expand.

2009-01-27, version 1.3: Support for independentminds journals.

2009-05-04, version 1.4: Support for Dreamwidth.

2009-09-22, version 1.5: Amend support for Dreamwidth.

2010-08-09, version 1.6: Made syndicated journals work.

2016-04-16, version 1.7: Add @grant line necessary for it to work on Firefox, apparently. Thanks [livejournal.com profile] sally_maria.

2017-10-18, version 1.8: Fix for https URLs.

nameandnature: Giles from Buffy (Default)
Greasemonkey is an extension for the Firefox browser which lets you write little programs to change how websites appear. For example, [livejournal.com profile] ilishin has created a script which lets you expand collapsed LJ comment threads in place (that is, on the same page, rather than on a new one). It only seems to work with the standard comment layout at the moment, but I hope the author will fix that soon (if not, it doesn't look so hard that I couldn't do it myself).

I noticed that the later versions of Greasemonkey support a key/value database which persists when you shut down and restart your browser. This means that it's probably possible to write something which remembers how many comments there are for an entry and will highlight items (on your Friends list, say) which have new comments. It might even be possible to highlight the new comments themselves, although it's not clear how good the database is, so you'd want to avoid overloading it, I suppose. I was vaguely aware of Greasemonkey, but I don't think I'd realised just how much it can do. Greasemonkey may be the thing which makes me switch from Safari to Firefox (it's just a shame nobody has sorted out Mozex for the Mac, as that'd certainly clinch it for me, too: I miss being able to edit LJ comments in a proper text editor).

Think I'd better dance now.

Profile

nameandnature: Giles from Buffy (Default)
nameandnature

December 2025

S M T W T F S
 123456
78910111213
14151617181920
2122 2324252627
28293031   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 6th, 2026 01:46 am
Powered by Dreamwidth Studios