|For Chrome||For Firefox|
What is it?
Detrumpify is a simple Chrome Extension that I wrote in a fit of pique. Donald Trump is a kind of doofus-vampire who, despite being epically wrong about just about everything, seems to have a magical sway over the media and a big chunk of the electorate. I got tired of seeing his name repeated endlessly, so I chose to do something about it. I took a list of excellent insults compiled from Jezebel.com and used them to create a little program that substitutes them every time you-know-who’s name appears.
Since then, I’ve expanded the list with more insulting monikers culled from the Internet, as well as a few of my own. I’ve also expanded the program, by providing a simple way to change its basic behavior by having the program obtain and update its configuration over the Internet. In fact, Detrumpify is really a rather generic tool now, usable to replace any text with any other text, in any webpage. What makes it “Detrumpify” are the default settings.
Using Detrumpify is simple. Simply install it from the Chrome Web Store, then visit a news site. If you click on the no-Trump icon, you can make some configuration choices such as:
- clean, dirty, or mixed insults
- maximum length (in words) of insult
- any scare-quotes or brackets for the insult
- apply a CSS style to the insults
- how often do the insults change (with every mention, daily, etc)
- If the configuration has more than one “action” (word it replaces) you can control which actions actually run.
If that level of configurability is not enough for you, you can create a configuration file or edit one of mine, instructions below.
What Websites are Affected
Detrumpify, by default, only runs on a specific list of websites. This is to make it as unobtrusive as possible and to avoid incompatibilities. That is, it’s not going to replace words in a GMail or Google Doc as you are typing. The list includes top web news sites, the web versions of major US newspapers, and most of the top right wing nut job sites. It does not include sites that already ridicule Trump because I found that changing out the name in someone else’s joke setting can actually spoil the joke.
This list is user-editable, however, and there is also an option to just let it run on any site.
How can I change Detrumpify’s behavior even more?
Detrumpify lets users make changes by changing its configuration file. By default, the configuration file (which I update from time to time) is loaded from ToolsOfOurTools. However, you can edit this file yourself locally, or, if you want, host a file on Dropbox and point Detrumpify at it. This lets you share a customization with friends, or to have it run on all your computers with minimal fuss. (To minimize the needed permissions for Detrumpify, other host domains blocked).
To customize, open the “options” screen and set the URL as appropriate. You can take one of the canned configurations and directly edit it by first showing the configuration then choosing the “edit” radio button. When you are done, the click “lock” radio button, which will parse your update JSON, and if it is correct, save it. Note that while the configuration is “locked,” you will not get updates from me with new insults.
This is what a configuration file looks like. Hopefully it’s mostly self-explanatory. The actions section contains one or more actions, for text to match and a list of potential replacements. If you always want the same moniker, then just provide one, otherwise the list will be used randomly. run_info contains information about how often to run. Most websites today do not render all their content immediately, so the extension waits awhile before starting, and then iterates a few more times, waiting a bit longer each time. This scheme seems to work nicely. The whitelist is a list of sites on which the extension will run. Sites not in the whitelist will not be affected at all. schema should be present and have the exact value shown below. refresh_age is the number of milliseconds between checking for update configuration. It’s only valid for configurations loaded from an URL.
"Gender-Threatened Lead Paint Factory Explosion",
By popular demand, I have made it easier for users to change the appearance of Detrumpify insults.
First, if you want to edit the config file, you can still do so. Simply set a key called match_style to a value that is a valid CSS style for span element, and that style will be applied to all insults.
However, you can now specify such a style right inside the extension options section.
There are books on CSS styling, but to get you started, the basics are that you can string together any number of “ name: value; ” elements to get your desired style.
|color: purple;||Makes the text purple.|
|font-style: italic;||Makes the text italic.|
|background-color: yellow;||Makes the background yellow.|
|background-color: blue; color: red; font-style: italic;||makes red italic text on a blue background (not recommended)|
None of the Detrumpify extensions/plugins will ever collect or transmit any information from you whatsoever.
If you are using one of the default config files, the Chrome extension will GET the config file URL weekly in order to check for new insults. This means that if the url is http rather than https, someone scanning your network traffic could tell that you are running the plugin. Config files stored on ToolsOfOurTools are only available via http, but you can also host a file on dropbox, and use https for that if you are concerned.
Who am I?
I’m a guy who likes to blog about public policy and technology, and who wrote a Chrome extension because he was fed up. My name is David. ToolsOfOurTools is this blog and is a reference to Henry David Thoreau, who suggested that we are somewhat enslaved by the things we make.