I've been fooling around with user javascript for Opera and fixed a few problems with the live preview. The first problem is that it doesn't appear at all for me. The second problem is the sluggish live update performance when viewing longer threads. My solution is available
here, but I wouldn't mind if it found another home, like the metafilter code? For instructions on how to install and enable user javascripts, go to
Opera's documentation.
Technical details: changing a page by editing innerHTML directly seems to be a big performance problem for Opera because it forces a reflow of the entire page. The recommended method is to create an invisible copy of the DOM node, make the edits on the invisible node, then put it on the screen with replaceChild. cloneNode and replaceChild are portable to Firefox 2.0 and MSIE7 at least, but I can't vouch for MSIE6. It also uses a 200ms timer to limit page updates to about five per second, sacrificing preview speed for keeping the textarea input snappy. I've tested it out on
this thread and
this one with 250 message count.
posted by milestogo at 10:18 PM on October 6, 2007