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: FyberOptic 2009-03-19 16:41

>>92
>>95
Guys, you're not helping.


>>94
Dude, the proper way to write an Opera UserJS script is using the window.opera interface, especially since I'm catching the AfterEvent.DOMContentLoaded event, because I want the page to update with the Fychan appearance as soon as possible.  Any other method would likely result in Fychan not taking control until after the entire page loaded (including images), which sucks.  Trust me, I've been writing this script long enough to know what is the most efficient method of applying itself to the page, based around how terrible the website loads sometimes.

I actually have multiple 4chan-related scripts which I wrote and use, providing features I may implement into Fychan one day, and others that are strictly for myself.  These scripts perform just fine with one another, and they all use the exact same window.opera interface and event to trigger.  So the problem isn't with Fychan.

If you're using document.addEventListener, then it sounds more like you're trying to adapt Greasemonkey scripts or something.  I don't use or test against them.  Opera has a certain degree of support for Greasemonkey, but not complete support.  If your scripts are not working, it's a problem in Opera's handling of them or in your code.

In a nutshell, Fychan is fine, implementation and performance-wise.  Aint changing it.  Sorry your script doesn't work right.


If anyone else has further direct comments or questions, just do it via the website, cause it's too easy for people to get confused when people pretend to be me.

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