Tonight in IRC we were bemoaning the lack of an ignore feature on the forums. I figured it would be possible to knock up a Greasemonkey script to inspect the DOM and strip out comments from a known list of offenders.
I did a quick View Source of a thread and extracted a single comment from the HTML. It looks like this.
Things to note:
- Each comment is in either a
<div class="comment even ">
or a<div class="comment odd ">
. - Inside this div is a
<div class="author">
, and inside that,<div class="author-name">
. - The "author-name" div has exactly one element, which is the name of the poster inside a link to their user profile.
So I guess that in order to strip out someone's posts, you'd just need to search through all the <div class="author-name">
elements in the DOM, and then remove the grandparent-div from any that you find. (Pedantry: this would muck up the different coloured backgrounds between alternate posts, but who actually cares.)
Now this is the point where I weasel out of doing it myself, using the excuse that I'm not familiar enough with web development and Greasemonkey scripting. Would any one of you lovely people be kind enough to do the forum a favour and knock a script up using these details?
Don't hate me because I'm beautiful.
[Edit] This script was written prior to the new GWJ, and I never used it so I don't know if it still works or not. If it doesn't then I just give you an oogaba-delivered (?) message:
You can also hide P&C entirely, if that's the primary source of your consternation.
Heh.... i find it sad that people want to put people on ignore here. One of the things i like about forums is that you can see dissenting opinions and choose to not read them. The onus is on you as long as those people aren't posting pictures of deviant sexual acts etc. (which you can't always unsee :)).
Then again, there are people who might post one or a short series of inflammatory comments that may make you want to put them on block but later on they will provide insight and interesting angles on a topic that you'd otherwise miss. I can think of a few people like this off the top of my head....
You start blocking one person.... then another few.... after a while you're visiting the site to look at white space.
If you're on firefox with the GM extension, get the greasefire extension too which will highlight whenever there's scripts available for the current site you're browsing.
Blocking is merely a tool; whether you use it for good or evil is up to you. And it's not like it's going to affect the experience of anyone other than you, so the only harm it's going to do is to yourself.
And of course, there's nothing to stop you unblocking people you've previously blocked.
That's not true at all. You're directly affecting the experience of everyone else on the site either through not reading the all posts in a thread so you repost redundant information or conflicting and previously dismissed 'truths' or facts.
Say i and three other people blocked Scratched there and the other three people had blocked me and each other.... You could end up with the situation of up to five people posting about the GM extension in firefox.
Alternatively you could miss out on important information - say you'd blocked Scratched - and you'd not know about the GM extension in firefox if no one else posted it.
Of course, as you point out, you could unblock people at any time. I just don't see the type of person who blocks someone due to a post or difference in opinion unblocking them due to a post they couldn't read. The psychology of a person who blocks someone for some past difference or stance would not mesh with someone who's giving them a second chance. The point being, if you're just going to unblock them any time they post something that you might want to read - why block them at all? Especially since you have no way of telling how much a particular post is 'worth'.
I actually wrote a Firefox extension called baNdit that allows you to ignore users on another site I frequent, and one of the main features is ignoring other users. The basic code, if you use jQuery is just:
$("div.author-name:contains('" + username + "')".parent("div.comment").hide();
Find a way to store/edit ignored users, and loop through the list every time the page loads, calling that line for each user. Ignoring replies to that user is more difficult, since people might not use quote tags.
If you don't mind editing the script yourself, you could just cut and paste lines, changing only the username, like:
$("div.author-name:contains('Floomi')".parent("div.comment").hide();
$("div.author-name:contains('Bonus_Eruptus')".parent("div.comment").hide();
$("div.author-name:contains('Scratched')".parent("div.comment").hide();
No looping or storage required.
Scratched wrote:If you're on firefox with the GM extension, get the greasefire extension too which will highlight whenever there's scripts available for the current site you're browsing.
Is this general info, or are you suggesting that the script already exists?
General info, it's a good addon for finding ways to make your favourite websites easier on the eye.
As for user ignoring, I suspect the same thing could be done through Adblock with a rule like "gamerswithjobs.com##DIV.nametoignore"
edit: that filter doesn't quite work
Here you go, Floomi:
Download it, save it as ignore_goodjers.user.js, then drag-and-drop onto Firefox. You and I are ignored by default, and you have to go into "Manage User Scripts" to edit it. Just add/remove names from the usersToIgnore array, and reload the page, and it should replace all of their comments with "Did $username Tannhauser me?" links that will restore the comments.
Biggest problem with my earlier code was that you can't access div.comment with jQuery because it chokes on newlines in the class name, which GWJ inserts for some reason. I had to clean them up a bit on loading the page.
Donations in the form of video games are welcome.
Cool! Now I can block Duoae.
And then it worked for me. Now I don't have to put up with Duoae's self-righteous "everyone's comments are equally important" comments any more ;)
Internet high-five!
*puts everyone on ignore, blathers away in the silence*
Speaking of Greasemonkey, is anyone nice enough to whip together something to hide certain threads in the tracker? Things you commented in two years ago, but no longer care about, that sort of thing?
Speaking of Greasemonkey, is anyone nice enough to whip together something to hide certain threads in the tracker? Things you commented in two years ago, but no longer care about, that sort of thing?
It's "Write jQuery stuff for Goodjers day" for me today, so I'll whip something up in a bit.
DF7 wrote:Speaking of Greasemonkey, is anyone nice enough to whip together something to hide certain threads in the tracker? Things you commented in two years ago, but no longer care about, that sort of thing?
It's "Write jQuery stuff for Goodjers day" for me today, so I'll whip something up in a bit.
Thanks! It will probably save me a lot of money, since I want to hide the deal thread.
Bonus_Eruptus wrote:DF7 wrote:Speaking of Greasemonkey, is anyone nice enough to whip together something to hide certain threads in the tracker? Things you commented in two years ago, but no longer care about, that sort of thing?
It's "Write jQuery stuff for Goodjers day" for me today, so I'll whip something up in a bit.
Thanks! It will probably save me a lot of money, since I want to hide the deal thread.
Quick and dirty script that took about an hour. Probably has bugs in it, but let me know if this is what you were looking for.
It'll work on your personal tracker and the main tracker. Looks like GM's wildcard system isn't as robust as I'd like. Either way, have fun.
I'm too stupid, how do I get this running?
First, install the Firefox Greasemonkey add-on.
First, install the Firefox Greasemonkey add-on.
Second, download it as a file, then drag and drop onto Firefox.
Then load your tracker.
Ok, but then nothing is different? How do I add threads to ignore? I think the script is running but I don't see a difference.
how did i get here i am not good with piano halp
Ok, but then nothing is different? How do I add threads to ignore? I think the script is running but I don't see a difference.
how did i get here i am not good with piano halp
I think it could be a problem with the tracker page URL. Which one are you using?
http://www.gamerswithjobs.com/user/8... OR
http://www.gamerswithjobs.com/tracke...
It's currently set up to only be included on the second format. Right-click the GM icon, manage the script, and add the following to the "Includes" section for that script:
http://www.gamerswithjobs.com/user/*...
That'll add it to that page, if you go through your profile and click the track tab. Didn't know it was a different URL format. After that, you should see "Ignore Thread" under thread titles in your tracker. Clicking those will ignore that thread and hide it. You can redisplay the hidden stories on the page if you want to unignore anything.
I am using the second format. I must have added it incorrectly.
Can someone write a GM script to prevent Google News from forcing the underlining of links? I would appreciate it.
Can someone write a greasemonkey script that will make me taller, more attractive and also richer? You can do that with jQuery right? There is a function that will let it use the MyLife API right?
Pages