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!
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:
Anonymous2006-06-01 1:51
So how do you extend/retract the threads then, you need to post some instructions :p Pics in the thread in /g/ will help :D
Name:
FyberOptic2006-06-01 1:57
There's some semi-instructions in the file itself, though I guess I should have mentioned'em here too.
If a thread has a dashed border, just click on the ID line in the bar at the top of each thread, and that'll load the full thread into the page. You can also disable the functionality with a button near the top of the page.
I'll just paste in the info I put in the file:
In a nutshell, this script allows omitted posts from threads to be expanded in-page, without the need to load the thread seperately. It also adds an extra page navigation bar above the threads, since just having one at the bottom kind of sucks sometimes.
When using this script, an "Enable Fychan" or "Disable Fychan" button will appear below the ad beneath the message posting form. This allows you to toggle the functionality of the script on and off.
When activated, all threads in the page are parsed and replaced, now contained inside bordered objects, with an ID bar along the top. The color/style of the border will differ depending on the thread. The different types are:
Solid black - Normal thread, no posts omitted
Dashed black - Normal thread, posts omitted
Solid green - Expanded thread
If a thread is surrounded by a dashed border, you should be able to click the link in the ID bar to dynamically load the full thread inside the container. Once the data is retrieved, the border will change to solid green to signify that thread is now expanded.
Name:
Anonymous2006-06-01 2:01
Thanks for that, I wasn't aware you could view the file
It works beautifully :D
I'll post suggestions here if I think of any :)
Name:
Anonymous2006-06-01 4:22
this is awesome, the only feature of the 4chan firefox extension i really wanted to see done in opera. would be nice if there was a way to minimize the threads after expanding.
Name:
Anonymous2006-06-01 7:27
nice work indeed. trying it out now
Name:
Anonymous2006-06-01 10:57
GJ man!
Name:
FyberOptic2006-06-01 12:43
I updated the script to v1.0.1. Same link to download it.
I fixed a DOM error that was happening when on the BBS here, fixed text spacing in certain spots, and implemented toggling of the standard/expanded threads.
As such, there's a new border style: dashed green. If you expand a thread, then shrink it again, this is the border you end up with. It means the thread is still in memory, and clicking on its ID bar will re-expand it without loading anything again.
There's still one small problem though which bugs me. The date on the OP disappears on the standard versions of the threads. I've figured out why, but fixing it might be another story. The date shows up fine on the thread once it's expanded, however.
As usual, let me know if anything seems wonky.
Name:
Anonymous2006-06-01 14:15
Could you make the next and previous pages load the same way? Would be cool.
Name:
Anonymous2006-06-01 15:33
I found a bug. Sort of. There is no need to load the script when browsing a thread, cause then there's nothing to expand
Name:
Anonymous2006-06-01 16:09
Hmm maybe you can put in a hide thread option?
Name:
Anonymous2006-06-01 21:50
can't d/l the update, your site appears to be down. any mirrors?
Name:
FyberOptic2006-06-01 22:30
My host was having some problems apparently, it's back up now.
I went ahead and made some minor changes, and updated it to v1.0.2. This fixes the flaws of certain bits of text not showing up (the date of the OP), and misc. spacing (which I was having to do a different fix on before) is showing up normal now.
It also deactivates now if it detects you're on a reply page. I had noticed before that it ran there and didn't much think anything about it, but since somebody else commented on that, I figured I might as well do something about it while I was at it.
So far, I've seen no problems due to the changes, so hopefully this release smashes all the bugs.
Name:
Anonymous2006-06-02 1:17
It still loads the "disable fychan"-button while on a reply page.
Name:
FyberOptic2006-06-02 1:37
I figured I'd leave it in the event I add more functionality which would affect those pages too.
Name:
FyberOptic2006-06-02 22:58
Tinkered around a bit more, and we're up to v1.0.3.
I took notice of a UserJS script someone else wrote, which converts urls in the page into clickable links, and wrote in code to this script to deal with that too. I haven't thoroughly tested it, but so far, I haven't seen any issues with it. It should convert urls in the normal page, in expanded threads, and even on reply pages.
Same url as above to download.
Name:
Anonymous2006-09-18 8:37
One thing this really needs: open thread's images to tabs. And disable that j-list ad. My own javascript does only these but it's not compatible with this and one is allways better than many.
>>19
I see what you mean, but couldn't you just use a site specific stylesheet with div#ad{display:none !important}?
Name:
Anonymous2006-09-18 13:54
>>20
not bad idea, though I'd prefer just adding something like this to the script:
document.getElementById("ad").style.display = 'none';
And that open all images to tabs is much more important than this.. Or I just make my script compatible with this. Dunno yet
Name:
FyberOptic2006-10-31 13:21
I haven't gotten around to implementing any new features, but now that I've had more time to browse 4chan again, I noticed the next/previous buttons were broken in the script now due to a 4chan code change, so I fixed that and released v1.0.4.2. Link is same as original post.
>>27
I block those useless and annoying ads because I WOULDN'T CLICK ON THEM ANYWAY!!! Why is it so hard to understand?
You want money from your stupid web site? Use a donation button, it's not killing my eyes and maybe I'll donate some cash.
Name:
Anonymous2006-12-24 7:34
You want money from your stupid web site? Use a donation button, it's not killing my eyes and maybe I'll donate some cash.
The standard excuse of someone that won't donate
Name:
Anonymous2006-12-24 7:41
>>29
You're fooling yourself if you think people don't donate. I do donate to web sites I visit on a daily basis, that's why I was talking about this, moron. I don't want my bandwidth wasted by annoying animated GIFs...
Animations in the web are for queer faggots. Queer faggots. The web is about text. Images at most. For everything else, there's Content-disposition: attachment. You don't want a simple web page to be fagged up with XBOX animations and Flash, and you don't want special requirements on your User-agent. You don't want to be distracted with gay faggot flashes and animations when reading text which is what you come to do. Gay faggot lusers wanted Star Trek-like interfaces, huh? How fucking nice. They should be forbidden from using computers until they mature. They should require a license to use computers.
>>33
Most of the times I'm here at world4ch I'm using elinks.
Name:
Anonymous2006-12-24 19:37
w3m > *
Name:
Anonymous2006-12-24 21:41
I block those useless and annoying ads because I WOULDN'T CLICK ON THEM ANYWAY!!! Why is it so hard to understand?
That's what everyone says, yet somehow advertising works.
If you see ad, chance of revenue is: 0.1%
If you see ad, chance of revenue is: 0.0%
It adds up. Your excuse is just a tragedy of the commons in the making. When was the last time you (yes you) donated?
usually if i'm thinking of buying something and then i see an ad for it, the chance of me buying it drops to 0.0%.
so if i don't see an ad, the chance of revenue is much higher than if i do see it.
and i just donated $150 to a radio station a couple weeks ago.