I made a SDMB-improving Greasemonkey script. Looking for feedback/beta testers

Quick intro for those who don’t know: Greasemonkey is a Firefox extension that lets you create/download javascript files that can automatically be run in your browser when you visit a certain website. For example, you can re-arrange links, move distracting content, and so on. Note that this only applies to your browser, and doesn’t affect the actual website for anybody else.

Anyway, I’ve been working on a script for the past few days to address some of the problems I’ve had since I showed up on your doorstep last month. The major features of the script follow:

Member Trait Badges

This is actually the reason I started making this script in the first place, though I think it may be the most controversial.

Basically, since I’m new here and don’t know everything about many people, I’ve found it sort of difficult to understand the context of everybody’s posts. For example, if a liberal made a sarcastic joke about conservatives, and I didn’t know he was a liberal, I might not know it was a joke. In topics about religion, it’s hard to remember who are the self-professed atheists and who are the religious ones. Not knowing these things can seriously damage the context upon reading.

So I made a system whereby traits about members can be cataloged, and so a handy badge appears next to their name on all of their posts.

For example, here’s someone who’s democrat and an atheist.

Here’s a republican.
Here’s someone who gets a bonus badge for being a member since 1999.

Here’s republican tea-party gun owner who’s been here since '99.

(Note that this data isn’t necessarily accurate at this point, I just put in some dummy data for testing, though I tried to only apply a trait to someone if they have publicly claimed it. Crafter says he’s not a republican, for instance, so he shouldn’t have that badge)

And here’s one that’s surprisingly useful: someone’s who’s a doctor.

I did a search for “IAAD” and recorded everybody who has claimed to be a doctor and has it as their occupation in their profile. Later, I looked in a thread where I’d asked a few medical questions and saw that some of the people who responded were doctors, and I had no idea at the time. Context!

The badge system works like this: there is a google spreadsheet where I can add someone’s username and then mark the traits that apply to them. Then, whenever you view a forum thread, the script pulls that spreadsheet data from Google, then compares the names of all of the posters on that page with the names on the spreadsheet. Because it pulls the remote data on pageload, as soon as the data changes on the spreadsheet it will be reflected for the script’s users. Basically, everybody’s script is always up-to-date. If the spreadsheet can’t be reached, no badges will be applied. No out-of-date information.

The actual images are held in another spreadsheet that caches in your browser, and updates daily, so “traits” can be added, removed, and updated constantly without end users needing to manually update anything.

The reason this might be controversial is that people might see it as prejudicial, like a scarlet letter. Me, I see them more like merit badges or bumper stickers. Because everybody with the script sees the same data, nobody can be left out by having a “judgy” badge applied to them.

I can open the spreadsheet’s permissions so multiple people can maintain the data, and Google lets you review or undo any change in the document’s history, so there’d be checks and balances and no possibility of hijacking.

If I were to release this script publicly, I’d probably have to institute a rule where traits can only be applied at a user’s request.
Highlighting Your Own Posts

As I’m browsing threads, I tend to jump around a lot, skimming quickly to try to find where the last place I left off is. Usually, I’m most interested in finding my posts and seeing if anybody has replied to them and called me a doo-doo head.

So I made it that if you’re logged in, all posts by you have a noticeable border so you can’t miss it: like this.

Also…

Highlighting Replies to Your Posts

When somebody quote-replies to you, your quote shows up in a similarly-highlighted way.

That way, you can more quickly spot when someone’s talking to/at/about you.

Flag Specific User’s Posts on This Page

Sometimes there’s a thread, like an “Ask the…” thread, where you’re most interested in keeping track of one person’s replies. Often I’m doing a Cmd-F search on the page to find the guy’s next reply.

So I added a little button on everybody’s posts that lets you flag all of that person’s posts on that page.

When you click it, that post and all others from that person get a green border. So they’re easier to spot.

Also, when you have somebody flagged and somebody quotes them, that quote gets highlighted as well, so you can see who’s talking to the user you’ve flagged.

You can flag multiple people at once, though they’ll all be the same color. And this all works on a page-by-page basis, so that person’s posts wont be flagged anywhere else.

Image Link Hover-Preview Thingies

While I agree with the limitation on this forum that prevents putting images inside of a post (that can make for some ugly chaos), it can be a bit inconvenient to have to click many links to see many pictures (like in this post).

Soooo… I’ve made it so the script detects when a link is to an image, and puts a little photo-icon next to the link. While this is in itself quite useful, letting you know when a link will get you an image, the real magic happens when you mouse-over that icon: a preview of the linked image hovers next to your cursor. It’s quite lovely.


If anybody knows how to install a greasemonkey script and would like to beta-test it, shoot me a PM.

If anybody has some suggestions or feedback about features, shoot me a PM.

If anybody is a javascript whiz and would like to contribute in some meaningful way, shoot me a PM.

If anybody hates me and everything about me, I’ll shoot you some BM.

/Mods, if you think this would be better in MPSIMS or IMHO, feel free to move it.
//Staff, if you are thoroughly impressed with my skills and fortitude and would like to offer me gainful employ within Chicago, I’ll entertain offers.

I must say that these are pretty bad ass. :cool:

Though if I were a doctor, I’d thank you not to use a picture of House. I’d want to be considered a professional and not [Insert Bad Words That House Is]. :stuck_out_tongue:

EDIT: To expound upon why I believe these are bad ass. For years upon years people have wanted avatars to help keep track of people using images instead of just their names. The problem with that is that pictures can be changed as frequently as you wish, making it hard for people to keep track. Plus there is always the problem of Really Fucking Annoying avatars.

Using a well designed, static and professional image next to someone’s name is a damn good start to help keep track of certain people’s quirks, beliefs and views.

You wouldn’t believe how long I tried to find a picture that represents “doctor” at 40 pixels high, and not just “here’s some guy with a tie”

How 'bout a stethoscope? Or maybe a picture of a nonHouse person with one of those old school mirrors on top of their head? Or would that give the impression of “mad scientist” instead?

Staff discussion over, thread moved back. Go to.

I’m not familiar with Google spreadsheets, but as a DB person, I’m cringing at that table layout. Is there any way you can normalize your structure so that you don’t have to add a new column and a hella lot of empty whitespace every time you come up with a new icon?

That seems like a really cool idea, and as soon as I figure out what a Greasemonkey Script is, I’d love to try it out.

Great idea, and great work you put into it. I’d actually been thinking about figuring out how to create something like your ‘badge’ system (I always loose track of who all mortally insulted me – being vindictive and having the attention span and memory of a chipmunk is just such a frustrating combination!), but then decided that would be too much like real work to put any effort into. Now, figure out a way to implement a working SDMB search, and I’ll sacrifice three black chicken in your name to a deity of your choice.

Gender badge?

Reiterating my original post (which apparently was lost when the thread was removed), I’m on board for testing. I have IE8 running on an AMD processor — just the sort of arrangement for ferretting out all the little gotchas.

By the way, wierdaaron, fantastic job. Not just the coding (which remains to be seen, honestly.) But the conceptualization. It is just an outstanding idea.

The old Caduceus might be doable.

I’m coming in a bit late to this discussion, I suppose, but here’s my two cents:

NOTE: In this post, I’m speaking strictly as a user of the SDMB, not as a moderator.

Conceptually, neat-o. As noted below, none of your links work, so I haven’t been able to actually see what it would do, but it sounds great.

I’m concerned that every single one of the links I followed from the OP gave me a “bad response from server” page. After several refreshes, I was able to see one on the badges, but I’m worried that with that kind of server performance, anyone using the scripts might have SDMB slowed down considerably.

Are you saying that you would be taking charge of updating that spreadsheet personally, forever? That’s quite a volunteer commitment. Or would it be open for others to modify, in which case we’d have vandalism issues to worry about.

Please PM me with instructions for loading the script. I’d like to give it a try rather than just speculating.

Thanks for putting in so much work on this.

Yeah, the links are broken for some reason. (He might have taken them down, pending the outcome of all the broohaha.) But the scripts will run locally on our own machines. They will in no way affect the SDMB server period. The SDMB server won’t even know they exist.

What happens is, a browser sends data to a server, and says, “This is the information I have for you. (Like Username and Password, for instance.)” The server sees that and responds by dumping data to the browser. Then the connection is over. Dropped. Done. Finished. Completed. Ended.

The browser takes over, formatting the data sent to it by the SDMB. Its interaction with the SDMB is finished until another link or button on your page is clicked. Some of us use CSS (Cascading Style Sheets), for example, to override what your server sends. BUT THIS DOES NOT REQUIRE OR INVOLVE A RECONNECTION TO YOUR SERVER. Same same with these scripts. They engage only AFTER the SDMB server has dumbed its load and disengaged.

ETA: Just hoping that helps you better understand how the whole thing works. :slight_smile:

I think the suggestion is moronic. I hope this thread is deleted. I get tired of self-appointed Gotcha Police who never let you forget anything you said. Grow up! Let the current comment be the one you respond to, not all prior items taken out of time and context. That stuff is for the nastiest political hacks.

Will they be put back up? I was really hoping at least to see what they look like.

Ah, if he took them down, that would explain it.

Yes, I understand that (I used to teach computer science), and I have no concern about the SDMB’s servers. You’ll note that my post clearly said I was speaking for myself as an SDMB user, and carefully said that “anyone using the scripts might have SDMB slowed down considerably.”

I realize that it wouldn’t affect the performance of the boards for people who didn’t have the script.

:smack:

God, I’m an idiot. Very sorry I misunderstood you. (In all fairness, though, your modifier was dangling.)

Note to others: It could be possible that your SDMB experience (but not the SDMB server) might be slowed down if the little icon images are kept on remote servers. But my understanding is that they will be cached right along with the scripts themselves. So, translation: First time open page, maybe just a bit slow (and maybe not); after that, usual blazing speed.

Sorry, my web server went down this morning so the example images weren’t available.

Those images are just on my personal server. The script itself doesn’t interact with my server at all. The only third party it deals with is Google, specifically because they tend not to go down.

I can allow read/write access to anybody with a gmail/google account and wants in. Consider it like the Wikipedia model. Yeah, some people might vandalize it, but there’s enough people with an interest in accuracy that vandalism will be undone.

Believe me, I wish it could be done easier. It would be best if I could have it running off of a SQL database, so editing could be more automated, but the advantage with google spreadsheets is that they’re not going to go offline randomly like someone’s personal server might, and they aren’t bothered by the bandwidth costs of multiple people hitting the script constantly, like someone with a limited hosting plan would be.

The good news is, the spreadsheet data is fed to the script as an xml feed, with gzip compression, so the wasted space isn’t too much of a concern. Since there’s no way to do dynamic queries, it has to be laid out line that. Plus, the layout makes more sense when you consider the way it looks in xml (every user is an <entity> with the traits inside of it).

I wish I had some trait badges for you so I could know if you’re joking. The use of the word “Gotcha” is just… just precious. At any rate, as I said, if this were to go public all of the traits would be completely at the discretion of the “target”. If you don’t want something being put next to your name, it will be removed. In fact, it could be entirely voluntary (“Please attribute the following things to me:…”) etc.

Except for a few dummy entries I made to make sure the badges work right, I only applied a trait to a user if they unequivocally applied it to themselves. For example, I used a recent atheist/theist survey to find out who’s an atheist; I looked for users who had self-identified as doctors more than once, and so on.

These aren’t “this guy sucks because he made fun of me once” badges. Remember: everybody sees the same badges, so people aren’t going to use it as a record of who has scorned whom.

Everybody else, thanks for the support/feedback. I’m glad that our silliness of last night has been resolved.

God, I hate it when people remember I’m a doctor!*
*not actually a doctor

Right. The reason I handle images the way I do is so that there wont be any unneeded delay. Greasemonkey scripts aren’t applied until the page has already finished downloading, so they don’t hold anything up. If there is any kind of delay (spreadsheet server being slow, or the javascript engine being sluggish) the only perceived delay will be in how long it takes for the script’s changes to activate. The forum page will load like normal, things will seem normal for a few seconds, and then the script effects will take place.

In this sense, it’s even better than if these changes were on the server-side, because then everybody’s browser would be held up by the javascript calls.

Right now, the images are cached inside the browser and only-reload if it’s been more than 24 hours since the last caching. I’m examining how this affects performance. It might be alright to cache on a weekly basis (though if any new badges were added, they’d be missing out on them for a week), or it might be better to not reply on firefox’s sloppy memory management to store it at all.

If I could find a place to store the images where the bandwidth wouldn’t be a concern, and there’d be little chance of the server ever going down (mine can be a bit wonky, since I have a lot of scheduled cpu-heavy database routines running on it for other websites), it would probably better to have the images remotely hosted so they can be treated and cached like any other browser image.