Hiding guest comments via Greasemonkey
Hiding guest comments via Greasemonkey
Posted Sep 13, 2007 9:25 UTC (Thu) by jhs (guest, #12429)In reply to: LWN advertising update II by lysse
Parent article: LWN advertising update II
I implemented this a while back as a greasemonkey script. It makes guest comments gray in color, with the message body hidden. Clicking a "View" button will expand it out so you can read the comment. The end result is that I could see all full subscriber comments, and only guest subjects.
I just went ahead and ported it to the non-table format and posted it on the web: http://www.proven-corporation.com/~jhs/lwn/. There are also screenshots of the older implementation, but it makes it easy to see what's going on.
Posted Sep 13, 2007 14:25 UTC (Thu)
by pflugstad (subscriber, #224)
[Link] (3 responses)
JHS, have you considered updating it try and deal with "new" articles vs ones you've seen already? That's the one feature I miss the most (kerneltral.org has it, and I love it, although the S/N ratio there is rather low). I know a little JS and a little DOM - I may take a look.
Again, thanks JHS for the excellent script.
Posted Sep 13, 2007 15:18 UTC (Thu)
by jhs (guest, #12429)
[Link]
If enough people use the script, we could have it send a background GET for /i-want-this-feature.html to the LWN site. Then, every month, Jon can grep the logs for the 404s to get an idea of demand for this feature!
About new articles since the last visit, I guess there are two approaches, both of which I do not know enough about Greasemonkey to criticize. Firstly, maybe the HTTP headers (particularly, "If-modified-since" from the browser) are accessible, and they can indicate when the browser last accessed the URL. Then, it should be simple enough to eliminate or collapse the comments posted before that date. The other option is to use some permanent storage and record all comments seen (they already have unique IDs from the [Link] anchor). I seem to recall that Greasemonkey does provide some kind of file-based storage, but maybe I'm just dreaming.
Finally, I am not a Javascript expert, but I got pretty serviceable at it over a short time by using the MochiKit library, which has complete documentation and unit tests and borrows many Python-isms.
Posted Sep 17, 2007 12:30 UTC (Mon)
by jhs (guest, #12429)
[Link] (1 responses)
See http://www.proven-corporation.com/~jhs/lwn/ for more information. I will try to send a letter to the editor for the next weekly addition, too.
Posted Sep 18, 2007 23:51 UTC (Tue)
by pflugstad (subscriber, #224)
[Link]
Thanks!
Posted Sep 13, 2007 19:01 UTC (Thu)
by lysse (guest, #3190)
[Link] (1 responses)
Posted Sep 17, 2007 12:26 UTC (Mon)
by jhs (guest, #12429)
[Link]
See http://www.proven-corporation.com/~jhs/lwn/ for more information. I will try to send a letter to the editor for the next weekly addition, too.
This is excellent, Thank You! Jon, you may want to add a page pointing at this (if JHS doesn't mind).Hiding guest comments via Greasemonkey
Well, I emailed my original version to Jon, and he replied with a very enthusiastic silence. But although I made the script for myself and others, IMO, this site's strength comes from its spare and simple layout. It's a slippery slope to add features and reduce the conceptual integrity.Hiding guest comments via Greasemonkey
I updated the Greasemonkey scripts. Now there are two versions. One hides guest postings as before. The other displays only new comments since the last time you viewed the thread.Hiding guest comments via Greasemonkey
JHS, You Rock! Hiding guest comments via Greasemonkey
Pete
Thanks, both for the script and because I think this is the first time I've ever found myself thinking "hmm, maybe it's time I installed Greasemonkey".Hiding guest comments via Greasemonkey
I updated the script. Now there are two versions. One version hides guest postings as before. The other version displays only new comments since the last time you viewed the thread.Hiding guest comments via Greasemonkey