Buy Official Merchandise!
Forumwarz is the first "Massively Single-Player" online RPG completely built around Internet culture.

You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.

You need to be logged in to post and to see the uncensored versions of these forums.

Log in or Learn about Forumwarz

Civil Discussion
Switch to Role-Playing Civil Discussion
Trolls Crazy (stupid?) MCB forum idea

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

How about enabling an option (in the options link, duh) which will make all text in RP be edited the way they are when you aren’t logged into the site? (Not the images — those can already be controlled)?

Then I could look at RP again. Oh man I’m so selfish.

Or I suppose someone could write a script which would do that. And maybe allow us to put in our own filters. That would be p. kewl.

spacekadt

MODERATOR
Avatar: 16186 2011-11-01 00:02:40 -0400
81

[Brainfreeze]

Level 69 Camwhore

meh

There’s a script out there that looks like you can do just that

http://userscripts.org/scripts/review/41369

I haven’t tested, but it’s customizable and you put whatever filters you want in there.

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

Tried it, but it’s case sensitive. GIVEN the WaY pEOplE around here use capitalization, that’s not going to fly.

Thanks tho Log in to see images!

TUBSWEETIE

Avatar: 3450 2011-07-31 00:45:06 -0400
28

[And The Banned Pla-
yed On
]

Level 37 Troll

MY MEMORY IS THAT OF A SMALL GRAPE

MC Banhammer Posted:

Tried it, but it’s case sensitive. GIVEN the WaY pEOplE around here use capitalization, that’s not going to fly.

Thanks tho Log in to see images!

it’d be easy to make it not case sensitive imo

CrinkzPipe

Avatar: 35643 2015-02-20 21:59:22 -0500
10

[Harem and Sushi Bar]

Level 62 Emo Kid

Hi, I'm an adult whos into bumes. But not boners!

I’m confused. Certain words make your ARP experience terrible?

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

CrinkzPipe Posted:

I’m confused. Certain words make your ARP experience terrible?

Not ARP. RP.

And yes.

Here’s the code for anyone who can tell me how to make it non-case-sensitive.

// ==UserScript==
// @name           Replace Text On Webpages
// @namespace      http://userscripts.org/users/23652
// @description    Replaces text on websites. Now supports wildcards in search queries. Won't replace text in certain tags like links and code blocks
// @include        http://*
// @include        https://*
// @exclude        http://userscripts.org/scripts/review/*
// @copyright      JoeSimmons
// @version        1.0.51
// @license        http://creativecommons.org/licenses/by-nc-nd/3.0/us/
// @require        http://sizzlemctwizzle.com/updater.php?id=41369
// ==/UserScript==

var words = {
///////////////////////////////////////////////////////
// Syntax: 'Search word' : 'Replace word',
"WordToReplace" : "wordtoreplacewith",
///////////////////////////////////////////////////////
"":""};

//////////////////////////////////////////////////////////////////////////////
// This is where the real code is
// Don't edit below this
//////////////////////////////////////////////////////////////////////////////

// prepareRegex by JoeSimmons
// Used to take a string and ready it for use in new RegExp()
String.prototype.prepareRegex = function() {
return this.replace(/([\[\]\^\&\$\.\(\)\?\/\\\+\{\}\|])/g, "\\$1");
};

function isOkTag(tag) {
return (",pre,blockquote,code,input,bumon,textarea".indexOf(","+tag) == -1);
}

var regexs=new Array(),
	replacements=new Array();
for(var word in words) {
if(word != "") {
regexs.push(new RegExp("\\b"+word.prepareRegex().replace(/\*/g,'[^ ]*')+"\\b", 'gi'));
replacements.push(words[word]);
}
}

var texts = dogreat timesent.evaluate(".//text()[normalize-space(.)!='']",dogreat timesent.body,null,6,null), text="";
for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) {
	if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && (text=this_text.textContent)) {
	for(var x=0,l=regexs.length; x<l; x++) {
	text = text.replace(regexs[x], replacements[x]);
	this_text.textContent = text;
	}
	}
}

Orifice

Avatar: Keyboard Keys

[Forumwarz Speakeasy]

Level 69 Hacker

“Trojan Horse Magnum”

MC Banhammer Posted:

Here’s the code for anyone who can tell me how to make it non-case-sensitive.

I’m looking at it, but having trouble making it work in greasemonkey even before I attempt changing anything.

My understanding is that it should search the page for words in the list you provide, and replace them with the corresponding word, yes?

Currently it is not doing that.

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

Orifice Posted:

I’m looking at it, but having trouble making it work in greasemonkey even before I attempt changing anything.

My understanding is that it should search the page for words in the list you provide, and replace them with the corresponding word, yes?

Currently it is not doing that.

The author says it’s case sensitive. Do you have the right case?

spacekadt

MODERATOR
Avatar: 16186 2011-11-01 00:02:40 -0400
81

[Brainfreeze]

Level 69 Camwhore

meh

http://userscripts.org/topics/41767

The author of the script actually mentioned it in the discussions tab. Looks like it should be as simple as removing a single letter.

Orifice

Avatar: Keyboard Keys

[Forumwarz Speakeasy]

Level 69 Hacker

“Trojan Horse Magnum”

For purposes of testing case sensitivity I made a quick ‘n dirty HTML file with different combinations of case. It doesn’t seem to be doing any replacement for me at the moment. Tried adding words I could see on Flamebate to see if it just didn’t like my html file, still nothing.

spacekadt Posted:

http://userscripts.org/topics/41767

The author of the script actually mentioned it in the discussions tab. Looks like it should be as simple as removing a single letter.

There it says it’s currently case insensitive. Which is what my reading up on Javascript RegExes suggested the purpose of that “i” was. I was trying to poke it about, see if it needed an i somewhere else in those dense and inscrutable blocks of brackets and slashes to make it actually work that way.

Orifice edited this message on 06/09/2010 2:56PM

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

It’s only somewhat case-insensitive. Or is otherwise ****ed up.

I was able to replace the word “Crazy” on this page with other text. But not the word “then”.

Orifice

Avatar: Keyboard Keys

[Forumwarz Speakeasy]

Level 69 Hacker

“Trojan Horse Magnum”

Tested it against another forum and it worked fine. Case insensitive and everything.

Might be a unicode thing – one of the reviews mentioned it only supports plain text. Could be it’s not going to work well on Flamebate because of some weird twitchy detail like that.

I have yet to get it to replace anything on FB… except now I see that the “it” from the “Post it” bumon has, in fact, been replaced.

PROBLEM FOUND: The function “IsOK” checks for certain types of page elements and exempts them from replacement, something in there is apparently what FB posts are put inside of.

Find the line

return (”,pre,blockquote,code,input,bumon,textarea”.indexOf(”,”+tag) == -1);

and remove “pre” from it.

Nearly made myself look like I had Tourette’s there… I was testing removing the different kinds of page elements, and using replacements going from common words to allcaps profanities so they’d be obvious if it worked, and I guess taking “input” out of the list made it replace all those common words before I submitted this post…

Orifice edited this message on 06/09/2010 3:26PM

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

Orifice Posted:

Find the line

return (”,pre,blockquote,code,input,bumon,textarea”.indexOf(”,”+tag) == -1);

and remove “pre” from it.

Did that.

EDIT: Ooh, quote typos. Looks like it’s working, will test more Log in to see images! MC Banhammer edited this message on 06/10/2010 12:41PM

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

spacekadt Posted:

http://userscripts.org/topics/41767

The author of the script actually mentioned it in the discussions tab. Looks like it should be as simple as removing a single letter.

With or without the “i”, case does matter Log in to see images!

man-man

Avatar: 156485 2010-01-24 16:36:14 -0500
24

[Harem and Sushi Bar]

Level 69 Hacker

Selfish fine upstanding member of society

Including the i should make it case insensitive. Pretty sure it’s working that way for me.

The following, I use to check case sensitivity:

test TEST Test tEST tEsT TeSt

and whether it picks words out the middle of other words/punctuation or not:

test? testicle attest attesticle //test\\ .test! @TEST&

Test results: all variants on “test” were replaced by a single word replacement rule (using “test” as the search word) except for those where test appeared as part of another word (testicle, attest, or attesticle).

Current script code being used:

// ==UserScript==
// @name           Replace Text On Webpages
// @namespace      http://userscripts.org/users/23652
// @description    Replaces text on websites. Now supports wildcards in search queries. 

Won't replace text in certain tags like links and code blocks
// @include        http://*
// @include        https://*
// @exclude        http://userscripts.org/scripts/review/*
// @copyright      JoeSimmons
// @version        1.0.51
// @license        http://creativecommons.org/licenses/by-nc-nd/3.0/us/
// @require        http://sizzlemctwizzle.com/updater.php?id=41369
// ==/UserScript==

var words = {
///////////////////////////////////////////////////////
// Syntax: 'Search word' : 'Replace word',
"test" : "win",
///////////////////////////////////////////////////////
"":""};

//////////////////////////////////////////////////////////////////////////////
// This is where the real code is
// Don't edit below this
//////////////////////////////////////////////////////////////////////////////

// prepareRegex by JoeSimmons
// Used to take a string and ready it for use in new RegExp()
String.prototype.prepareRegex = function() {
return this.replace(/([\[\]\^\&\$\.\(\)\?\/\\\+\{\}\|])/g, "\\$1");
};

function isOkTag(tag) {
return (",blockquote,code,input,bumon,textarea".indexOf(","+tag) == -1);
}

var regexs=new Array(),
	replacements=new Array();
for(var word in words) {
if(word != "") {
regexs.push(new RegExp("\\b"+word.prepareRegex().replace(/\*/g,'[^ ]*')+"\\b", 'gi'));
replacements.push(words[word]);
}
}

var texts = 

dogreat timesent.evaluate(".//text()[normalize-space(.)!='']",dogreat timesent.body,null,6,null), text="";
for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) {
	if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && 

(text=this_text.textContent)) {
	for(var x=0,l=regexs.length; x<l; x++) {
	text = text.replace(regexs[x], replacements[x]);
	this_text.textContent = text;
	}
	}
}

man-man edited this message on 06/10/2010 12:56PM

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

Ah, so it’s not a case issue, that was just coincidence. It’s just that embedded it’s not working.

Any easy way to make that work? So testicle would change to nononoicle?

man-man

Avatar: 156485 2010-01-24 16:36:14 -0500
24

[Harem and Sushi Bar]

Level 69 Hacker

Selfish fine upstanding member of society

I think I remember seeing that issue discussed on the userscripts page. If there are old versions available you might find one from before he “fixed” that.

Edit: Oh, or maybe use wildcards in your search words. If your search word is “*test*” it’ll match any word containing test as a substring (just tested that and it works) although it’ll replace the entire word with your replace word, so it may take some more work to get a RegExp working to match any word with it as a substring, and then only replace the specific part you want it to

man-man edited this message on 06/10/2010 1:06PM

MC Banhammer

Avatar: 1887 2011-07-31 00:40:59 -0400
36

[Good Omens]

Level 69 Troll

Trying to create drama to drum up the ratings by any means necessary!

man-man Posted:

I think I remember seeing that issue discussed on the userscripts page. If there are old versions available you might find one from before he “fixed” that.

Edit: Oh, or maybe use wildcards in your search words. If your search word is “*test*” it’ll match any word containing test as a substring (just tested that and it works) although it’ll replace the entire word with your replace word, so it may take some more work to get a RegExp working to match any word with it as a substring, and then only replace the specific part you want it to

Yeah, wildcards did the trick, just as you suggested. As you said, still replaces the entire word, but I can live with that because if I really need to see the rest of how whatever I’m converting looked, I can always disable Greasemonkey for a bit.

Kewl, thx all!

Peregrine

Avatar: 135742 2011-10-31 19:55:54 -0400
6

[love is a dog from-
hell
]

Level 35 Camwhore

Forumwarz' Pretend Homosexual

so like is this because certain words are really that offensive or just so you can view flamebate on a work computer because that’d be a really nifty toggle-on setting if this game ever actually had developments

Peregrine

Avatar: 135742 2011-10-31 19:55:54 -0400
6

[love is a dog from-
hell
]

Level 35 Camwhore

Forumwarz' Pretend Homosexual

maybe we could call it forumwarz brown to symbolize all the **** thats getting filtered out

Internet Delay Chat
Have fun playing!
To chat with other players, you must Join Forumwarz or Log In now!