[Greasemonkey] greasemonkey for personalized accessibility?

Jeremy Dunck jdunck at gmail.com
Thu Apr 28 08:27:11 EDT 2005


On 4/28/05, Mark Pilgrim <pilgrim at gmail.com> wrote:
> LINK NOT SAFE FOR WORK
> http://www.arantius.com/misc/greasemonkey/clean-language.user.js

I knew about that script, but hadn't viewed the source.  It's a riot.

badwords is an array of all bad words.

The magic is:
element.textContent.replace(bw, '***'), where bw is an regex
alternation of all the words in the array:
bw="\\b("+badwords.join("|")+")\\b"

I don't think that could possibly scale out to all the bad words.  I
bet the regex implementors never figured on such an abusive use case.

.. Made me laugh, anyway.


More information about the Greasemonkey mailing list