Detrumpify

nbc-fires-donald-trump-after-he-calls-mexicans-rapists-and-drug-runnersApropos of nothing, I have written a very simple Chrome extension (and a Firefox add-on) that replaces references to the Short-Fingered Vulgarian with any of several other aliases. The initial “seed” for the list came from Jezebel, which published a list of 70 such names for the Cheeto-Faced Ferret’s 70th birthday.

I really should take the time to make this plugin user-configurable, so that you can add your own insults.  However, that seems a lot of work for something that basically works ok as it is. If you want to see the (very simple) code, check it out here on Github. I’ll take pull requests. [Edit 7/6: have now done this and the link above points to the new version. Original version still available here.]

I plan to add new insults as I come across them (feel free to provide), at least through November 2016. If you have suggestions, please note that I’m only using family-friendly insults.

Enjoy!

 

 

PS — A few people have noted that the plugin doesn’t run on this or that website. That’s because it uses a whitelist of websites. I chose to do this to make the plugin as compatible and friendly as possible. It will run on the New York Times, but not on GMail, for example, nor will it interfere with your transactions at First National Bank of Trump. If you are running the current version, Detrumpify2, you can change that list yourself by adjusting the configuration file. If using the “classic” version, you’ll have to write me and ask to change it, and when I do, you’ll have to re-approve the plugin with the new permissions. Because of that, I’m going to try to avoid adding new sites to the “classic” extension too many more times.

 

28 thoughts on “Detrumpify”

    1. It depends on whether you are installing for chrome or Firefox. For chrome, you obviously must be running chrome, and I think it may be necessary to be logged into chrome. Then when you bring up the chrome link in the post, there will be an install button. Click it and approve the permissions, and you should be good to go. Alternatively, you can go to the Chrome Web Store and search for detrumpify.

      For Firefox, it is similar, except that you must be running Firefox to start, of course.

      I checked they links in the post and they are correct.

      Please note that detrumpify does not run on all websites. This was to avoid potential compatibility problems and confusion when detrumpify affects your email or banking or whatever. Therefore, it runs only on about 30 sites from major newspapers and media outlets.

  1. Have you created a filter to get rid of his ugly face? I find that the reference to him in words (the filter) is working, but I would love not to look at his stupid expressions and annoying better than everyone look that is overtaking the net!!!

    1. In fact, I have. It doesn’t work all the time, but it works a lot. Go to the options icon in the upper right and then set “Kittenize” to one of the settings other than “Off”. Trump pictures will be replaced by blanks or kittens, depending on what you set. The “More Kittens” setting is more aggressive about finding Trump pictures, at the expense of probably turning some non-Trump pictures into kittens.

  2. LOVE this extension. Makes me laugh every single bloody time!

    Idea for one (I’m sure that you get these a lot): something like “Personification of passing a kidney stone”?

    1. It is no technical work to do McConnell. The work is to get a good list of insults! I’ll do him when I get at least five good ones that cannot be confused with anyone else. I’m open to suggestions!

      Best,
      Dave

  3. I am using Firefox, and I am trying to figure out a way to replace pictures with kittens while not replacing the name “Trump” with an insult (it was funny for a while, but it gets distracting). I would like to continue to see kittens, though. Is there a way to do this?

    Thanks.

    1. Hi Peter,

      Thanks for the note. What you have discovered is a little bit of a bug in Detrumpify. Basically, kittenization is tied to replacement. If you turn one off for a given person, you also lose the other. It’s not a trivial bug for me to fix because it requires some new UI elements to get right.

      In the meantime, what I have done is created a new config file for you. Click the “No T” icon and “No Insults — Just Kittens”. Also, make sure kittenization is turned on. I have only tested it lightly, but it seems to work. You get kittens and no word replacements.

      An alternative, of course, is a different plugin. I think there is a “Trump Kittens” plugin out there. I do not know if it is being maintained.

      PS — there are some minor bugs in the FF plugin that have been fixed in Chrome but not in FF. The reason is that the FF plugin team is harder and slower to work with, and they are more likely to reject a plugin. The last time I sent an update, they noticed that my plugin fetches config files from a third party source (my site) and that they would not approve future updates that continued to do so. But that is how I am able to add new insults in a timely manner and how I was able to help you. This is PARTICULARLY important on FF, where the approval team can take a week or more to approve even a minor update to a plugin. Okay, rant mode off.

      Best,
      Dave

        1. You just click on the detrumpify icon and then in the drop-down for “Config” you choose “No insults — just Kittens”. You still have to leave “Replace Images” set to “Kittens” as well.

          Best,
          Dave

  4. Great idea, Dave! One question: Is it possible to add custom pictures to replace Trump with if you want more than kittens? Like puppies, bunnies, Astronomy Picture of the Day, Pusheen the cat, or the subfolders in %userprofile%\My Pictures where I have literally hundreds of .jpgs of Barack Obama and Justin Trudeau 🙂

    Asking for a friend, of course…

    1. It is certainly possible, but it’s more work than it sounds. The kitten feature relies on an external service that can provide kitten pictures of any requester size and aspect ratio. I don’t know of other services that can do the same thing, but for other fun stuff, and it would be a fair amount of work to curate such a database.

      Still, it could probably be done quick-n-dirty if you were okay with only cycling through a handful of images and stretching them a bit to fit if they are not the right size.

      I’ll definitely consider working on this if I have some free time, but I can’t make any promises. Detrumpify is actually already quite customizable and configurable and very few people have done any customization as far as I know. 🙁

      1. Thanks for the quick reply! I’d still love to replace the Tangerine Nightmare (is that on your list of insults? If not it should be added) with two of my favourite handsome world leaders… but, kitties are always welcome too. A lot better than that roadkill sitting on his head… 🙂

        1. It is now!

          I remember now a bit why I did not already do this. The code to match pictures to placeholders is tricky, but I can write it. However, there is a copyright issue. If I host pictures from around the net, I’ll have to be careful about that. If I allow users to host locally on their computers, I have to request another permission for the extension, which will probably freak out a bunch of potential users (extension wants to read your files) for a feature that few users will use. Chrome has a feature for “optional permissions” so I could ask Chrome to elevate permissions only for users that want to access local file resources. But for some reasons, “file://” type patterns to not work as optional origins, and there is a cross-site blocking problem, too. Basically, Chrome makes this very hard.

          So I decided to punt until I thought of a better way.

          1. I decided to bow to public pressure and try to implement some other image replacement options. A forthcoming version of Detrumpify will allow users to select puppies or bunnies in addition to kittens. Images are hosted on this server, so performance may become an issue. We’ll see…

            Best,
            Dave J

    2. kthxbai,

      I have released a new version (1.2.1) of Detrumpify that has puppy and bunny options. I will probably add other stuff over time as well. Security rules enforces by Chrome and FF make it well nigh impossible to base images on local files, but I can host them on this site.

      Anyway, new version should be live for FF and Chrome, so give it a whirl.

      Perhaps I will make an option for Obama pics…

  5. Just a quick request to re-enable local editing of the config. Go in to do some editing tonight (having already added about 50 of my own monikers over the last week), only to find that that option is now missing completely. NOT happy.

    And we definitely need screaming babies for one of the pic options.

    1. Oh, foo! I had never heard of anyone ever using this feature, and honestly, it was a super hassle to support, and so I yanked it. The config page is hoary enough even with out it.

      Have you tried hosting your config file on DropBox? I just verified that this works, though it is a wee bit tricky:

      – zeroth, create a dropbox account. Hey, it’s free!
      – first, edit your json file and upload it to dropbox
      – in dropbox “share” the file so that anyone one the interwebs can see read it
      – while sharing, click the copy link option.

      You should get a link that looks like this:

      https://www.dropbox.com/s/3qr1gr1hklloa42/clean-daily.json?dl=0

      – now modify that link slightly, removing the parameters, so that it looks like this:

      https://www.dropbox.com/s/3qr1gr1hklloa42/clean-daily.json

      – Next, paste that link into the insult config URL input on the Detrumpify config page and click [save]

      – Finally, verify that the config loaded by clicking “show configuration details”

      I just tested this and it worked.

      I know this is not quite as convenient as being able to paste the JSON in directly, but it does have some small advantages, like being able to share with friends and more easily being able to set up multiple computers (your desktop, your laptop, etc) with the same config. Plus, you can update the file in one place and all your devices pointing to it will update automatically.

      So, what do you say? Will you be satisfied so I don’t have to feel bad about removing that code? Really, it was making my crazy.

      As for the screaming babies, I’ll get right on it. Check in a day or two.

      Best,
      Dave

  6. I don’t know how to configure white lists, or anything that isn’t a simple click. This add-on is NOT working on DemocraticUnderground.com. IT HAS TO WORK THERE. HELP.
    I cannot stand seeing that things face and seeing it’s name. HELP.

    1. Hi Rob, sorry you’re not getting what you want. The easy thing to get it to run anywhere is to click the “run anywhere” checkbox on the configuration page.

      I’ll add democraticunderground to the canned configuration files this weekend.

      If you want to host your own config file, then I’d recommend you download one of the canned files as shown in the URL line of the configuration panel. For example, use wget or curl to pull down the file. Then edit it as you see fit. There is a long array of whitelisted addresses. Then upload that file to dropbpox, share it publicly, and then point the configuration url at your file on dropbox. That should work.

      Unfortunately, I just don’t have the time now to make the config screen much more sophisticated for adding your own white and black listed sites. Maybe I’ll get to it before T is impeached.

      Best,
      Dave

  7. Dave,

    I figured it out. All by myself. Don’t ask. Now I am howling with laughter at all the names I’m seeing. Now it’s hard to find the news, because I can’t see through the tears of laughter. Bless you for this wonderful piece of software. It will keep my brain from frying, more than it already has, and will, no doubt, keep me from a few nightmares. Thank you!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *