12 Years of Skylanders, Have You Played Any?
View Results
darkSpyro - Spyro and Skylanders Forum > Site Help and Suggestions > Undefined Users Script for GreaseMonkey Users
Page 1 of 1
Undefined Users Script for GreaseMonkey Users [CLOSED]
UncleBob Ripto Gems: 4565
#1 Posted: 07:09:09 26/10/2014 | Topic Creator
So, here's the first script I feel comfortable releasing. It doesn't do much, but you can use it so that users you want to ignore simply show up with the name of "undefined". Just patch this into GreaseMonkey, add in the names of your undesired users, and voila! On each page, it'll replace their name with "undefined" - be it in a thread, a profile, whatever.

// ==UserScript==
// @name
// @namespace   UBDSUndefined
// @description Hides users
// @include     [url]*[/url]
// @version     1
// @grant       none
// ==/UserScript==

for(var i=0;i<8;i++)
 document.body.innerHTML= document.body.innerHTML.replace("Troll1")
 document.body.innerHTML= document.body.innerHTML.replace("Troll2")
 document.body.innerHTML= document.body.innerHTML.replace("Troll3")
 document.body.innerHTML= document.body.innerHTML.replace("Troll4")
 document.body.innerHTML= document.body.innerHTML.replace("Troll5")

IMPORTANT: For some reason, this forum software is adding URL tags into the script when I cut/paste it in. You'll need to remove them from line five before you save the script.

Just replace the "Troll#" with the person you want to ignore. You can cut and paste more lines in, if you want to ignore more than five people, but the more you add, the longer it'll take to run the script - be forewarned. When typing in the user name, it's both case sensitive and space sensitive, so type it *exactly* as it appears on the user's profile. For example, if you wanted to undefine myself, you'd have to type "UncleBob". "Uncle Bob", "Unclebob" or any other variation will not work.

This won't remove their avatar, signature or their individual posts (that's a different beast to tackle), but might help you resist the temptation to respond.

Edited 3 times - Last edited at 07:56:37 26/10/2014 by UncleBob
UncleBob Ripto Gems: 4565
#2 Posted: 07:50:56 26/10/2014 | Topic Creator
Quote: Wild
Hey, uh, please just keep this to a discussion about the script itself...?

Thanks, man. :D

Hm. One thing about the script - the forum is forcing URL tags inside of the script for no reason whatsoever.

After you plug it into GreaseMonkey, you'll need to edit those nasty URL tags out of line 5.
Edited 1 time - Last edited at 07:53:06 26/10/2014 by UncleBob
UncleBob Ripto Gems: 4565
#3 Posted: 07:55:04 26/10/2014 | Topic Creator
Thanks, I've only been at it for about two days. Hopefully, I can get the other, more useful part of this process in place with no issues.

I did manage to make a script that removes every single post from a thread. That... wasn't useful. ;)
Edited 1 time - Last edited at 07:58:13 26/10/2014 by UncleBob
arceustheprime Ripto Gems: 5362
#4 Posted: 07:59:22 26/10/2014
say you wanted to change undefined to uhhh filthywaifulover69 for.... scientific reasons, how would you do that?
UncleBob Ripto Gems: 4565
#5 Posted: 08:02:37 26/10/2014 | Topic Creator
You'd change:
 document.body.innerHTML= document.body.innerHTML.replace("Troll1")

to read:
 document.body.innerHTML= document.body.innerHTML.replace("Troll1","filthywaifulover69")

I had it set up where it replaced the names with "Ignored User", but something about leaving then "undefined" was just more satisfying. ;)
UncleBob Ripto Gems: 4565
#6 Posted: 20:27:06 26/10/2014 | Topic Creator
To try and bring some clarity here, I'd like to talk a little about what GreaseMonkey is and isn't.

GreaseMonkey isn't a separate program or a 'hack', it's an extension that one can install onto FireFox. It's the same kind of concept as AdBlock or Ghostery. Adblock and Ghostery are pretty simple add-ons - when a page is being loaded into your browser, these extensions look for a particular code (one that displays an ad or flags a beacon) and removes that code before your browser finishes loading the page.

To link to a graphic from AdBlock Plus' website:
[User Posted Image]

What this means is, simply, if I had AdBlock installed, the effects of AdBlock *only* occur on my computer. I'm not changing anything server-side, nor am I changing anything for other users.

To break it down more simply - think of this like television. The television station broadcasts a signal. You - like everyone else - pick up the signal on your TV. Now, a commercial comes on - so you hit the mute button. You're changing the way the television broadcast signal is displayed on your television - but doesn't, in any way, affect how anyone else views or receives the signal.

GreaseMonkey is the *same* concept - but the thing that differentiates it from AdBlock or Ghostery is that individual users can create or add in their own scripts, telling GreaseMonkey what to look for and what to do with it once it is found. AdBlock and Ghostery are pretty defined in what they look for and, for the most part, are controlled remotely by the creators of those extensions. Whereas AdBlock might only look for and remove "X" and Ghostery might only look for and remove "Y", with GreaseMonkey, you can make it so that it looks for and removes "X", "Y", and "Z", but also changes "A" to display twice the normal size, "B" to display in green instead of blue and "C" to be replaced with alternate text.

But, no matter what a user does with GreaseMonkey, those changes will ONLY affect that user (and only on the browser where they install the script - for example, my phone currently doesn't have anything on it, so it displays as it would for every other user). I know how doing something to a computer that another person doesn't understand equates to "hacking" - I've seen it a million times over my years, both in my private and professional life (Side Note: I once got accused of "hacking" into a work website when all I did was click a link that sent a request for me to have access to the site and the assistant to the individual in charge approved it without telling the individual in charge. When the individual in charge found out I had access to the website, he assumed that I "hacked" it because I had access. All I did was click a link that said "Can I come in?"). It's not "hacking" and it's not nefarious - it is merely hitting the mute button on the TV remote when an ad comes on that you don't want to hear. Everyone else can still hear the ad if they choose - or they can even hit the mute button. Heck, they can turn up the volume to the max if they want. :D
Iceclaw Hunter Gems: 10094
#7 Posted: 20:35:08 26/10/2014
Is GreaseMonkey only available for FireFox ;m;
Twinkies and 2hus
UncleBob Ripto Gems: 4565
#8 Posted: 20:40:41 26/10/2014 | Topic Creator
Yes. Chrome has an extension called Tampermonkey, although I don't know anything about it and I don't know if you can cut and paste GreaseMonkey scripts into Tampermonkey.
Edited 1 time - Last edited at 20:41:52 26/10/2014 by UncleBob
Iceclaw Hunter Gems: 10094
#9 Posted: 20:46:22 26/10/2014
Ooh okay
I usually use Chrome and CD but no harm in switching to FireFox whenever I get on here.

Thanks for the Script !
Twinkies and 2hus
Page 1 of 1

Please login or register a forum account to post a message.

Username Password Remember Me