Saturday, December 01, 2007

I wish all Teddy Bears were named Muhammad

Back in 2006, the world didn't know how to act when a firestorm erupted over some cartoons in a right-wing Danish newspaper. Currently, people are freaking out in Sudan because a teacher allowed her students to name a Teddy Bear Muhammad.

In a show of solidarity w/ Ms. Gibbons (the teacher in question), and because I haven't posted a greasemonkey script for a while, below you will find a greasemonkey script that gives EVERY TEDDY BEAR ON THE WWW the name Muhammed. Above, a screenshot illustrates that there is a big community of TBNM collectors on eBay.

Christians are welcome to use this script to name all teddy bears on the World Wide Web Jesus, Rastafarians may use it to name all teddy bears Jah, and Satanists may use it to name all teddy bears Satan. Jews may use it to name teddy bears Moses or Sandy Koufax, jazz fans can use it to name all teddy bears 'Trane, the possibilities are endless, really.

The script:

// ==UserScript==
// @name TBNM
// @namespace none
// @description gives all teddy bears on the WWW the name 'Mohammed'
// @include *
// @version 1.0
// @homepage redacted
// ==/UserScript==
(function() {
var bad = [], good = [], modifiers = [];
// Terms are listed as comma separated couples of words, in the form
// "Censored Word": "replacement"
// [Place custom word list below]

"teddy bear(s?)(?! named M.hamm.d)":"Teddy Bear$1 Named Muhammad",

// [End of custom word list]
}, "gi");
// END CONFIGURATION (don't touch anything below, unless you know what you're doing...
function populate(replacements, flags) {
var word, modPos, mod;
for(var key in replacements) {
if((modPos = key.indexOf("/")) > -1) {
mod = key.substring(modPos + 1);
word = key.substring(0, modPos);
} else {
mod = "";
word = key;
bad.push(new RegExp(word, flags));

// this function does the replacements
function sanitize(s, noContext, notredirect) {

for (var j = 0; j < s =" s.replace(bad[j]," title =" sanitize(document.title," textnodes =" document.evaluate(" i =" 0;" node =" textnodes.snapshotItem(i);" data =" sanitize(,">

More about Greasemonkey

You have to use Firefox for this to work. Sorry.

No comments: