sane-cliki.user.js attempts to fix CLiki's handling of HTML entities when editing pages (see my previous rant). Due to the ways browsers try to correct for mangled HTML in <TEXTAREA> tags, it wasn't possible to just grab the source via DOM and encode it properly; I had to make an additional request to the CLiki server to get the unadulterated page source. This does mean that every time you hit the “Edit” link at the bottom of a CLiki page, two requests will be sent to the CLiki server and you have to wait for both of them to complete. And yes, it means this single script uses both Greasemonkey and XMLHttpRequest, which is like a double hip web takedown.
This is a hacky way of fixing the problem, but it works until CLiki is updated. And when I say it “works,” I mean that I tried it at least twice and it crashed at most once. The script requires, of course, Firefox and Greasemonkey. One could probably do something similar with PithHelmet for Safari.
Mark Pilgrim's Dive Into Greasemonkey was very helpful.Posted by jjwiseman at May 23, 2005 02:46 PM