Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

4chan UserJS script (for Opera)

Name: FyberOptic 2006-05-31 22:27

The 4chan extension for Firefox has a few nice things to offer, and I've found myself using that browser to peruse 4chan at times, even though my primary browser is Opera.  Unfortuantely, nobody seems to have ever written any enhancements for it (that I've ever found), so I decided to write one myself!

http://www.fybertech.com/userjs/fychan.js

This mostly implements the feature I prefer most; loading a full thread right inside the page, instead of loading a seperate page to see the omitted posts.  Just in the time I've been testing it, I've already been finding it pretty useful.

In any case, this is a UserJS script for anyone not in the know.  It's Opera's version of an extension language.  I've found myself using it a lot lately, not just to add features to websites, but to fix other ones that won't work properly in Opera.  It's great.

If you don't know how to install a UserJS script, it's simple.  You can either read the elaborate explantion at http://userjs.org/help/installation , or just:  Go to Tools, Options, Preferences, then the Advanced tab, pick the Content section, click Javascript Options.  In the "My Javascript files" blank, put like "c:\userjs" (minus the quotes), then create that folder on your computer, and copy the script inside.  You'll probably want to right-click/save-as to get the script onto your computer, mind you.

Anyway, if anyone wants to mess around with it and see if they can find any  problems, feel free.  I'm also welcome to suggestions of things to add.  Hope some folks find it useful!

Name: Anonymous 2009-03-20 1:40

>>97
It seems you do not really know what you are talking about. The `proper' way to catch any event is document.addEventListener. Normally, you'd hook DOMContentLoaded. The window.opera interface is provided so that you can load your script before or after other scripts you wish to patch/overwrite. Not just for any arbitraty change to the document.
In any case, claiming your script is zomgoptimized is just one fat lie. It's slow as fuck, mainly due to you inserting and swapping around a metric fuckton of nodes, triggering repaints/reflows every so often.

Oh well, I'm not bothering anymore. Learn to Javascript/DOM. And do visit http://dev.opera.com/articles/ and look up Javascript performance issues.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List