Browser plugin: The New Yorker

In my mind, New Yorkers are known for swearing. At least in the movies, people from NY use the F-word at least 3 times every sentence. It brings some liveliness to the conversation. Wouldn’t it be nice to recreate this experience in your online articles?

I don’t know who needs this, but I made a bookmarklet (like a plugin for your browser, but not really) that randomly injects profanity in text (mainly the f-word). I think it’s hilarious, but that probably just shows my infantile sense of humor.

The bookmarklet also randomly turns some buzzwords into ‘bullshit’ (words like ‘lean’, ‘innovation’, ‘design’, ‘productivity’, etc), which greatly improves reading Medium articles.

It works on iOS as well.

How to add The New Yorker to your browser?

Simply bookmark a page (CMD-D in Safari), then rename the bookmark to “F-it” or “The New Yorker”, and copy the code below (including the “javascript:”-part).

javascript:function randomProfanity(needle, haystack, profanity, chance) {
if(Math.random() < chance)
  return haystack.replace(needle, profanity);
else
  return haystack;
}

profanities = [
  [" a ", " a fucking ", .5],
	[". ", ". It's so shit. ", .1],
  ["doing", "fucking doing", .5],
	[" this ", " this fucking ", .1],
	[" that ", " that stupid ", .1],
	[" the ", " the goddamned ", .1],
	["design", "bullshit", .1],
	["lean", "bullshit", .1],
	["innovation", "bullshit", .1]];

nodes = document.getElementsByTagName("p");

for(var n=0; n< nodes.length; n++) {
profanities.forEach(profanity => {
	nodes[n].textContent = randomProfanity(profanity[0], nodes[n].textContent, profanity[1], profanity[2]);
});
}

Ps: apparently NY is not the state that swears most in the US




Share this story