Last active
July 19, 2019 17:31
-
-
Save jangxx/fa6c012f76ef86f7fddb69a5989f7b42 to your computer and use it in GitHub Desktop.
A userscript which replaces Annegret Kramp-Karrenbauer with funny names. Userscript version of this extension: https://github.com/voodoocode/pannengeraet-krank-knarrenbauer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Pannengerät Krank-Knarrenbauer | |
// @namespace https://literalchaos.de | |
// @version 1.0 | |
// @description Replaces the name Annegret Kramp-Karrenbauer with funny names | |
// @author /u/voodoocode, /u/jangxx | |
// @match *://*/* | |
// @grant none | |
// @downloadURL https://gist.github.com/jangxx/fa6c012f76ef86f7fddb69a5989f7b42/raw/akk.user.js | |
// ==/UserScript== | |
const substitutionsFirst = ['Ammenschreck', 'Allesweg', 'Akazienfleck', 'Allesgeht', 'Astverdreht', 'Assizeh', 'Atemgerät', 'Armeegebet', 'Ananasbeet', 'Aufgedreht', 'Abgeweht', 'Alter Met', 'Altgewebt', 'Ausgelebt', 'Apfeltee', 'Affenzeh', 'Arbeitsamt', 'Arschgeweih', 'Ammoniak', 'Aknecreme', 'Angelgrät', 'Ankerbett', 'Annegate', 'Annektiert', 'Annregret', 'Angedreht', 'Armgedreht', 'Angerät', 'Ampelgrät', 'Aalgerät', 'Abendbrot', 'Angriffskrieg', 'Angedreht', 'Ampferbeet', 'Apfelmet', 'Abfluggate', 'Abhörgerät', 'Alleskleb', 'Algensee', 'Ballergret', 'Bannegret', 'Pansensalat', 'Panzergret', 'Pannengerät', 'Stoßgebet', 'Windgedreht', 'Windverweht', 'Undefined', 'Un-Fair Trade', ]; | |
const substitutionsMiddle = ['Ganz', 'Hanf', 'Harz', 'Kampf', 'Kann', 'Klein', 'Klump', 'Klotz', 'Kotz', 'Katz', 'Krampf', 'Krank', 'Kein', 'Krebs', 'Kommt', 'Kennt', 'Krupp', 'Kranz', 'Krabbe', 'Klang', 'Klamm', 'Kran', 'Lanz', 'Mampf', 'Trump', 'Trumpf', 'Tand', 'Sand', 'Schrank', 'Land', 'Pfand', 'Kant', 'Band', 'Wand', 'Punk']; | |
const substitutionsLast = ['Akkuschrauber', 'Flaschenknauser', 'Gartenlaube', 'Gassenhauer', 'Harkenklauber', 'Haubentaucher', 'Kackebauer', 'Katzenjammer', 'Kackenkarrer', 'Klammerkauer', 'Karrenklauer', 'Kalterschauer', 'Kampfhubschrauber', 'Karpfenkauer', 'Krakenkrauler', 'Keilerhauer', 'Knarrenbauer', 'Koksanbauer', 'Karottenbauer', 'Kolabrauer', 'Kamelraucher', 'Kranbauer', 'Klosteinmauer', 'Karatehauer', 'Klausverhauer', 'Krimkalauer', 'Krillverdauer', 'Katerflauer', 'Katzenmiauer', 'Katzenkrauler', 'Knotentauer', 'Koreamauer', 'Kamillenbrauer', 'Kastratenkrauler', 'Kardinalvertrauer', 'Kroatenlauer', 'Kapillarenkalker', 'Kloakenrauer', 'Kreisbegatter', 'Kolibriklabauter', 'Klimperpower', 'Kliniktrauer', 'Konradadenauer', 'Nervenklauer', 'Neunmalschlauer', 'Nasenklauer', 'Pfaffenhauer', 'Schinkenklauber', 'Schnakenfauna', 'Winterpflaume', 'Wackelbauchtier', 'Wannentaucher']; | |
const nicknames = ['AKK-47', 'Büchsengretl', 'CDUzi', 'Granaten-Gretel', 'Knarren-Greta']; | |
(function() { | |
'use strict'; | |
var elements = document.getElementsByTagName('*'); | |
for (var i = 0; i < elements.length; i++) { | |
var element = elements[i]; | |
for (var j = 0; j < element.childNodes.length; j++) { | |
var node = element.childNodes[j]; | |
if (node.nodeType === 3) { | |
var replacementFullname = substitutionsFirst[Math.floor(Math.random() * substitutionsFirst.length)] + " " + substitutionsMiddle[Math.floor(Math.random() * substitutionsMiddle.length)] + "-" + substitutionsLast[Math.floor(Math.random() * substitutionsLast.length)]; | |
var replacementNickname = nicknames[Math.floor(Math.random() * nicknames.length)]; | |
var text = node.nodeValue; | |
var replacedText = text.replace(/Annegret Kramp-Karrenbauer|Kramp-Karrenbauer/gi, replacementFullname).replace(/\bAKK\b(?![ -]47)/gi, replacementNickname); | |
if (replacedText !== text) { | |
element.replaceChild(document.createTextNode(replacedText), node); | |
} | |
} | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment