# Greasemonkey script to replace annoying phrases on the SDMB (e.g. quarry throwing)

**URL:** <https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347>\
**Category:** About This Message Board\
**Created:** [September 20, 2013, 10:51pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347 "2013-09-20T22:51:03Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)\
**Post date:** [September 21, 2013, 9:27pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/21 "2013-09-21T21:27:11Z")

</div>

> [@AaronX](#):
>
> Don’t you need to consider a huge variety of possibilities? Like spam email?  
> Lets go to the quorry and throw stuf down there

That’s what advanced regular expressions are for 🙂

But you’re right, if someone is determined to spam the board with weird variations of his/her phrase, just to evade your filters, they could do it, but (a) it would be tough, since they don’t know what filters you have in place, and (b) if they did, the phrases would start to look like spam selling viagra pills.

---

<div class="post-metadata">

**Author:** ![Crazyhorse](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crazyhorse/32/31_2.png) [@Crazyhorse](https://boards.straightdope.com/u/Crazyhorse)\
**Post date:** [September 22, 2013, 12:14am UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/22 "2013-09-22T00:14:49Z")

</div>

> [@SiXSwordS](#):
>
> I haven’t had a chance to use this very much yet, but—so far as I can tell—if you use the Post Reply or Quote options (as opposed to Quick Reply) the URL will contain ‘newreply.’ My tests have allowed me to eliminate the script if the URL contains ‘newreply’ but I haven’t tested that beyond the Hello World Script I posted.

Brilliant! It seems to work fine after adding newreply.php to an exclude line in the script header.

---

<div class="post-metadata">

**Author:** ![SiXSwordS](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@SiXSwordS](https://boards.straightdope.com/u/SiXSwordS)\
**Post date:** [September 22, 2013, 6:25pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/23 "2013-09-22T18:25:51Z")

</div>

> [@Polerius](#):
>
> Add this line to the definition of the replacements variable 🙂

:rolleyes:  
You are so cool!

---

<div class="post-metadata">

**Author:** ![Leo\_Bloom](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/leo_bloom/32/10377_2.png) [@Leo\_Bloom](https://boards.straightdope.com/u/Leo_Bloom)\
**Post date:** [September 23, 2013, 2:13pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/24 "2013-09-23T14:13:17Z")

</div>

Wait, this works on _whose_ posts? Just the ones temporarily visible to the programmer who wants temporary eyeball filters, right?

---

<div class="post-metadata">

**Author:** ![SiXSwordS](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@SiXSwordS](https://boards.straightdope.com/u/SiXSwordS)\
**Post date:** [September 23, 2013, 4:36pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/25 "2013-09-23T16:36:33Z")

</div>

> [@Leo\_Bloom](#):
>
> Wait, this works on _whose_ posts?

It works on anyone’s posts. but the effect is only on the local browser, one with the script loaded and enabled. Similar to ad block or other extensions and plug-ins. I do not see the ads on my browser, but no one else is affected.

---

<div class="post-metadata">

**Author:** ![elmwood](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/elmwood/32/3060_2.png) [@elmwood](https://boards.straightdope.com/u/elmwood)\
**Post date:** [September 24, 2013, 9:37pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/26 "2013-09-24T21:37:11Z")

</div>

Very nice. How well does it handle line breaks?

Regards,  
Not Shodan

---

<div class="post-metadata">

**Author:** ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)\
**Post date:** [September 24, 2013, 11:00pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/27 "2013-09-24T23:00:50Z")

</div>

> [@elmwood](#):
>
> Very nice. How well does it handle line breaks?
> 
> Regards,  
> Not Shodan

Add the following line to your replacements:

```auto

"Regards,<br>
Not Shodan": "<b>Don't believe anything that I wrote above</b>"

```

---

<div class="post-metadata">

**Author:** ![Nzinga\_Seated](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@Nzinga\_Seated](https://boards.straightdope.com/u/Nzinga_Seated)\
**Post date:** [September 25, 2013, 1:37am UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/28 "2013-09-25T01:37:57Z")

</div>

Grease monkey script writers keep this up, and all the crybabies are going to get very upset at having nothing to cry about anymore.

---

<div class="post-metadata">

**Author:** ![SiXSwordS](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@SiXSwordS](https://boards.straightdope.com/u/SiXSwordS)\
**Post date:** [September 25, 2013, 12:54pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347/29 "2013-09-25T12:54:38Z")

</div>

> [@Nzinga\_Seated](#):
>
> Grease monkey script writers keep this up, and all the crybabies are going to get very upset at having nothing to cry about anymore.

I range from proficiency to simple familiarity with Javascript, C++, Groovy, Grails, Java, PHP, HTML, python, perl, and various basic languages used for writing macros…

I continue to have high hopes that I will solve some tricky problem like fuzzy string searches or maybe write the next Angry Birds or some must-have App…

I know I will never never never EVER write ANY code, script, method, app, program, or software suite to reduce complaining, whining, kvetching, bitching, moaning, grumbling or gruntling.

The truth is, the more code you write to address such behavior, the greater the expectation that you should be able to fix annoying little problems. You have no idea how many times I’ve heard the phrase, “It would be nice if…”

[Previous page](https://boards.straightdope.com/t/greasemonkey-script-to-replace-annoying-phrases-on-the-sdmb-e-g-quarry-throwing/669347.md?page=1)
