User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Better Wolf Web: a Greasemonkey script for Firefox Page [1] 2 3 4 5, Next  
FroshKiller
All American
51908 Posts
user info
edit post

Many moons ago, I solicited ideas for a user script that would improve the Wolf Web. Today, I'm making available the first official release of that script. Before I get into the features, here is what you need to know.

1. You need Firefox! Specifically, you'll want Firefox 3.1 or later. You can download Firefox here: http://www.mozilla.com/firefox

2. You need Greasemonkey! This is a fantastic add-on for Firefox that lets you create client-side scripts to extend websites' functionality. You can download it here: https://addons.mozilla.org/en-US/firefox/addon/748/. There are also tons of user scripts for all your favorite sites at http://userscripts.org/.

3. You need to download and install the script itself once you've installed Greasemonkey. The link for this release is http://lolibrary.org/bww/better_wolf_web.user.js. When you've installed Greasemonkey, you can just click that link and choose to allow installation.

So, what does it do?

Broadly, Better Wolf Web takes the message board functions on the Wolf Web and makes mostly invisible improvements to the underlying mark-up, allowing you to create your own scripts for use here more easily. I know that most of you won't do that, so I've built in some of the most requested features already. Let's talk about those more.

User Blocking
I don't like this feature, but it was by far the most requested. From any user's profile page, you can choose to block or unblock that user. Threads by blocked users are removed from message board thread lists and hidden in their own group, which you can display with a click. Inside a thread, posts by blocked users are blanked out, but you can reveal them with a click as well.

To manage your blocked user list, click the wolf icon in the upper left of any Wolf Web page. There, you can follow a link to blocked users' profile pages.

NSFW Thread Warnings and Voting
In any thread, you can press V to bring up a small [nsfw] link on each post. Click that link, and that post is reported to my database as NSFW.

Whenever you load a message board section, the list of threads is checked against my database for NSFW threads, which are then highlighted in red and classed "nsfw." You be surprised nearly as often by a pair of tits in a thread again.

YouTube and MP3 Players
Links to YouTube videos and MP3 files in posts are automatically converted to embedded players for your convenience. You need not follow a blind link to watch or listen.

Miscellaneous Thread Improvements
IFRAMEs are automatically converted to links instead. Large images that might cause horizontal scrolling are scaled to match your window.

In each post, there are now links that go directly to send a PM, view a user's photo gallery, or search for all of a user's posts.

Facebook-Style Photo Navigation
Clicking on a photo advances to the next photo in the album. The left and right arrow keys are bound to move to the previous and next photo, respectively.

Expect to see more functionality in future releases. I'm sure I missed something, so if you have questions or a suggestion, let me know in this thread.

8/3/2010 12:32:09 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

Sweet! Just installed it. Ok, I had your previous versions, which were awesome... but this release is kickass!

8/3/2010 12:48:07 PM

qntmfred
retired
40628 Posts
user info
edit post

wtg frosh

8/3/2010 12:53:51 PM

jocristian
All American
7525 Posts
user info
edit post

Quote :
"IFRAMEs are automatically converted to links instead."


This feature should have its own name. You could call it the gunzz.

Nicely done.

8/3/2010 2:52:37 PM

El Nachó
special helper
16370 Posts
user info
edit post

This is awesome.

Personally I'd prefer to see NSFW threads indicated by a small tag off to the side of the thread name as opposed to highlighted in red. The highlights seem to change the look of TWW too much for my taste. But that's only a minor thing. No big deal either way.

Nice work though.

edit: found a small bug with the block feature. The blocked user list from a previous version was still on my computer somehow, so now when I re-block someone with this version their name shows up twice. Also if they were previously blocked, but not re-added, they are still blocked in the "Last Post" field, but not in the thread itself. Again, no biggie, but I thought you might want to know about these types of things.

8/3/2010 2:53:39 PM

dweedle
All American
77386 Posts
user info
edit post

if rflong and rjrumfel had that iframe-->link feature way back when, id have never been suspended

8/3/2010 3:06:34 PM

FroshKiller
All American
51908 Posts
user info
edit post

jocristian said:
Quote :
"This feature should have its own name. You could call it the gunzz."


Actually, if you look at the source, the function is called gunzzDegayifier.

El Nachó said:
Quote :
"Personally I'd prefer to see NSFW threads indicated by a small tag off to the side of the thread name as opposed to highlighted in red. The highlights seem to change the look of TWW too much for my taste. But that's only a minor thing. No big deal either way."


I can go either way with that. I'll look into alternative formatting.

Quote :
"edit: found a small bug with the block feature. The blocked user list from a previous version was still on my computer somehow, so now when I re-block someone with this version their name shows up twice. Also if they were previously blocked, but not re-added, they are still blocked in the "Last Post" field, but not in the thread itself. Again, no biggie, but I thought you might want to know about these types of things."


Right-click the Greasemonkey icon in the status bar, and choose Manage User Scripts. Select the previous version, check Also uninstall associated preferences, and click the Uninstall button.

[Edited on August 3, 2010 at 3:24 PM. Reason : holy typos]

8/3/2010 3:19:59 PM

El Nachó
special helper
16370 Posts
user info
edit post

Cool, that fixed it, thx.

8/3/2010 3:25:15 PM

craptastic
All American
6115 Posts
user info
edit post

I think Froshkiller is a pretty cool guy. eh makes tww scripts and doesnt afraid of anything.

8/3/2010 3:34:02 PM

kiljadn
All American
44689 Posts
user info
edit post

function gunzzDegayifier()

8/3/2010 7:13:06 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

Awesome! Thanks man!

8/3/2010 7:43:15 PM

Solinari
All American
16957 Posts
user info
edit post

how about a function that detects upon post submission, whether or not your post will be the 49th post and automatically double-posts, if so.

8/4/2010 9:57:11 AM

FroshKiller
All American
51908 Posts
user info
edit post

I'd rather do one that warns you when you're about to make the 49th post.

8/4/2010 10:04:17 AM

raiden
All American
10505 Posts
user info
edit post

that would be awesome.

or how about when you make that 49th post, it automatically adds the "set 'em up"

8/4/2010 1:04:38 PM

kiljadn
All American
44689 Posts
user info
edit post

what if you prefetched pages 2+ and had them shits load AJAX style so we don't have to worry about 49th post?

8/4/2010 1:09:36 PM

FroshKiller
All American
51908 Posts
user info
edit post

I went over this in my original thread, but pre-fetching entire pages and discarding all but one or two elements is kinda sloppy and bullshit (generates artificial traffic, is lazy), so I don't really wanna do that stuff. But qntmfred gave me his blessing to do it if I really want, so maybe I will, I dunno.

8/4/2010 1:14:28 PM

Lokken
All American
13361 Posts
user info
edit post

This would rock in Chrome

8/4/2010 2:41:12 PM

FroshKiller
All American
51908 Posts
user info
edit post

Maybe you could write a Chrome port!

8/4/2010 3:00:50 PM

Madman
All American
3412 Posts
user info
edit post

This is awesome. Good work Froshkiller.

8/4/2010 3:11:11 PM

El Nachó
special helper
16370 Posts
user info
edit post

Quote :
"what if you prefetched pages 2+ and had them shits load AJAX style so we don't have to worry about 49th post?"


There's already a couple of plugins for Firefox that do this, but each site has to be configured manually. I found an old thread saying that AutoPager worked on TWW, but I just loaded it to try it out and it didn't seem to find the configuration for TWW, so I guess that's for an older version.

8/4/2010 3:18:18 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

yeh, I had autopager or something similar that worked just fine on here...

8/4/2010 7:30:51 PM

FroshKiller
All American
51908 Posts
user info
edit post

I could probably do an autopager thing.

Back to the top to pimp.

[Edited on August 9, 2010 at 8:32 AM. Reason : wait no it ain't]

8/9/2010 8:27:44 AM

CalledToArms
All American
22025 Posts
user info
edit post

Quote :
"This is awesome. Good work Froshkiller."

8/9/2010 11:43:36 AM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

^^meh, I got rid of autopager because I found it more annoying than useful

m2c

8/9/2010 2:48:19 PM

se7entythree
YOSHIYOSHI
17377 Posts
user info
edit post

Quote :
"Personally I'd prefer to see NSFW threads indicated by a small tag off to the side of the thread name as opposed to highlighted in red. The highlights seem to change the look of TWW too much for my taste."


i agree. on my computer it's pink instead of red anyway. a little icon b/w NEW & the thread title would work well imo.

otherwise, thumbs up!

8/11/2010 10:26:19 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

mine, too, is pink... but it doesn't really bother me.

but if you were to change it... how hard would it be to just replace the new/old icon with a NSFW icon?

what about somehow indicating which post in NSFW? like the actual post is highlighted... or a little message pops up when you scroll near it... hell IDK if any of this is possible, just thinking.

8/11/2010 11:10:16 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

Yeah, I like ^ better actually. Particularly replacing the icon with NSFW. Maybe a different color one so it stands out on its own.

Either way, this is a pretty sweet script!

8/11/2010 11:58:34 PM

FroshKiller
All American
51908 Posts
user info
edit post

Funny, I was already planning to replace the color highlighting with a [nsfw] tag where the NEW/OLD icon is in the next release. Any other feedback?

8/12/2010 7:10:04 AM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post



what about somehow indicating which post in NSFW within the thread? like the actual post is highlighted... or there's an embedded message just before the NSFW post (like inserting row between the last SFW post and the next, NSFW post with a NSFW tag).... it would be nice to have a warning (because I'll look at threads that are marked NSFW, because I know they aren't... until that one post half way down)

8/12/2010 11:53:17 AM

DeltaBeta
All American
9417 Posts
user info
edit post

I like it a lot. Thanks.

8/12/2010 12:50:27 PM

kiljadn
All American
44689 Posts
user info
edit post

Quote :
"Maybe you could write a Chrome port!"




I kinda don't understand why it doesn't work right out of the box. I'd love to help port it, but I don't even know why one userscript would work in FF but not in Chrome while others do without a hitch. A cursory googling of it didn't help too much, either.

8/13/2010 6:11:34 PM

FroshKiller
All American
51908 Posts
user info
edit post

It's because I made use of some Firefox-specific aspects of Mozilla's JavaScript implementation, namely native JSON handling and an awesome forEach method.

That was deliberate, mind you. I was like, "It's Firefox anyway, might as well." And I was also like, "I use Firefox, so let Chrome users eat cake."

[Edited on August 13, 2010 at 6:19 PM. Reason : ]

8/13/2010 6:16:41 PM

kiljadn
All American
44689 Posts
user info
edit post

well I use FF, but I use 4.0b4

8/13/2010 6:32:24 PM

goalielax
All American
11252 Posts
user info
edit post

how about making it so that when we click our user name in the upper left it takes us to our own user info page?

[Edited on August 16, 2010 at 11:58 PM. Reason : .]

8/16/2010 11:58:38 PM

El Nachó
special helper
16370 Posts
user info
edit post

^oh shit, that's a wonderful idea.

8/17/2010 1:57:03 AM

FroshKiller
All American
51908 Posts
user info
edit post

True story: There's nowhere consistent on any given page that provides that currently logged-in user's user ID, so I can't actually do that without some trickery (i.e. somehow gleaming your user ID from somewhere else and storing that value like I store the users you've blocked).

8/17/2010 8:04:33 AM

se7entythree
YOSHIYOSHI
17377 Posts
user info
edit post

i want to change the color. the red is glaring. can i get like grey or navy or something?

8/17/2010 9:50:20 AM

BIGcementpon
Status Name
11318 Posts
user info
edit post

^^What page doesn't show it there?

8/17/2010 11:52:55 AM

FroshKiller
All American
51908 Posts
user info
edit post

Any page where there isn't already a link to your profile or a link to PM you, for instance. For example, a thread you haven't posted in, practically every non-forum page, the message boards list when yours isn't the last post in one of the threads, etc.

8/17/2010 12:25:30 PM

AstralAdvent
All American
9999 Posts
user info
edit post

will this work on the wolfwall?

I'm AstralAdvent and i approved this message.

8/17/2010 2:54:10 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

^^Aaah I get it. The actual User ID # is the problem. I feel like a reh-tard.

8/17/2010 9:52:45 PM

ncsuallday
Sink the Flagship
9818 Posts
user info
edit post

great job man.

took less than 30 seconds to install everything

9/7/2010 12:30:38 AM

BubbleBobble
:3
114281 Posts
user info
edit post

Quote :
"will this work on the wolfwall?"

9/7/2010 1:09:56 AM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

hey, could you make function gunzzDegayifier() optional... it kills google maps embeds... I like the links for most frames, but things like google maps shouldn't be included.

9/11/2010 1:37:43 PM

raiden
All American
10505 Posts
user info
edit post

so no one has made a chrome port?

this is neat.

9/12/2010 10:26:57 AM

FroshKiller
All American
51908 Posts
user info
edit post

ncsuallday said:
Quote :
"great job man.

took less than 30 seconds to install everything"


Thanks! And thanks for pointing out how easy it is to start using it. One of my goals was to make it easy to just download it and go.

wdprice3 said:
Quote :
"hey, could you make function gunzzDegayifier() optional... it kills google maps embeds... I like the links for most frames, but things like google maps shouldn't be included."


If you right-click on the Greasemonkey icon in the lower right corner, you can choose Manage User Scripts. From there, you can highlight Better Wolf Web and click edit. That will bring up the main bit of code that runs on Wolf Web pages.

You can easily delete the line that calls gunzzDegayifier() or comment it out with two slashes (//). If you're feeling froggy, you could redefine the function entirely. It wouldn't be too hard to modify it to exclude Google URLs. I'll post an example after I get done with this post.

raiden said:
Quote :
"so no one has made a chrome port?

this is neat."


Thanks! I haven't heard anything about a Chrome port, and no one has asked me about any implementation details. It's not complicated, though. Even though I've relied on some Firefox-specific stuff, I'm not doing anything that Chrome can't do (as far as I know).

9/13/2010 8:57:34 AM

FroshKiller
All American
51908 Posts
user info
edit post

One of my goals was to make Better Wolf Web easy to modify and extend beyond its basic scaffolding without turning it into a complicated scripting language all its own. So let's take a look at wdprice3's request to have gunzzDegayifier() ignore Google Maps. Here's the function as it exists now:

function gunzzDegayifier() {
gunzzFrames = $('.post_message_content iframe');
gunzzFrames.each(function(){
iFrame = $(this);
iFrameURL = iFrame.attr("src");
iFrame.replaceWith('<a href="' + iFrameURL + '" target="new">' + iFrameURL + '</a>');
});
}


Pretty straightforward, but it's not the clearest thing in the world. Basically, it grabs all the IFRAME elements in the thread, then it replaces each of them with a link to the embedded page. Easy peasy.

We want it to leave embedded Google Maps pages untouched, though. So let's check whether the address includes maps.google.com:

function gunzzDegayifier() {
gunzzFrames = $('.post_message_content iframe');
gunzzFrames.each(function(){
iFrame = $(this);
iFrameURL = iFrame.attr("src");
if (iFrameURL.match(/maps.google.com/) == null) {
iFrame.replaceWith('<a href="' + iFrameURL + '" target="new">' + iFrameURL + '</a>');
}
});
}


This tests the IFRAME's URL with JavaScript's match() method to see whether it contains "maps.google.com." Since match() returns null if there is no match, it tests against null. If the URL does not contain "maps.google.com," it replaces the IFRAME. Otherwise, the function simply returns control to whatever function called it.

[Edited on September 13, 2010 at 9:19 AM. Reason : oop]

9/13/2010 9:18:15 AM

Fareako
Shitter Pilot
10238 Posts
user info
edit post

Just installed it. Awesome!

10/7/2010 6:46:18 PM

wdprice3
BinaryBuffonary
45912 Posts
user info
edit post

I just switched to chrome because of FFs slowness (it just kept getting slower and slower)

I miss FF and this script

someone port it to chrome!

10/7/2010 7:10:10 PM

BIGcementpon
Status Name
11318 Posts
user info
edit post

I'm afraid to click on this thread at work. It's all NSFW apparently.

10/8/2010 2:34:13 PM

 Message Boards » Feedback Forum » Better Wolf Web: a Greasemonkey script for Firefox Page [1] 2 3 4 5, Next  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.