SHARE
TWEET

Untitled

a guest May 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var elements = document.getElementsByTagName('*');
  2. var badWords = ['Paludan', 'fjende', 'forbyde', 'forbud', 'hjemsende', 'sende hjem', 'væk', 'tilbage', 'mord', 'racis', 'problem'];
  3. var islamWords = ['muslim', 'islam', 'indvandrer', 'invandrer', 'flygtning', 'nydanskere'];
  4.  
  5. String.prototype.replaceAll = function(search, replacement) {
  6.     var target = this;
  7.     return target.split(search).join(replacement);
  8. };
  9.  
  10. String.prototype.contains = function(search) {
  11.     var target = this;
  12.     return target.toLocaleLowerCase().lastIndexOf(search.toLocaleLowerCase()) !== -1;
  13. }
  14.  
  15. String.prototype.containsBadWord = function() {
  16.     var target = this;
  17.     for (var i = 0; i < badWords.length; i++) {
  18.         if (target.contains(badWords[i])) {
  19.             return true;
  20.         }
  21.     }
  22.     return false;
  23. }
  24.  
  25. String.prototype.containsIslamWord = function() {
  26.     var target = this;
  27.     for (var i = 0; i < islamWords.length; i++) {
  28.         if (target.contains(islamWords[i])) {
  29.             return true;
  30.         }
  31.     }
  32.     return false;
  33. }
  34.  
  35. String.prototype.containsMuslimSingular = function() {
  36.     return (text.containsBadWord() || text.contains('udrydde')) && (text.contains('muslim') || text.containsIslamWord());
  37. };
  38. String.prototype.containsMuslimPlural = function() {
  39.     return (text.containsBadWord() || text.contains('udrydde')) && (text.contains('muslimer') || text.containsIslamWord());
  40. };
  41. String.prototype.containsRefugeeSingular = function() {
  42.     return (text.containsBadWord() || text.contains('udrydde')) && (text.contains('flygtning') || text.containsIslamWord());
  43. };
  44. String.prototype.containsRefugeePlural = function() {
  45.     return (text.containsBadWord() || text.contains('udrydde')) && (text.contains('flygtninge') || text.containsIslamWord());
  46. };
  47. String.prototype.containsImmigrantSingular = function() {
  48.     return (text.containsBadWord() || text.contains('udrydde')) && (text.contains('indvandrer') || text.containsIslamWord());
  49. };
  50. String.prototype.containsImmigrantPlural = function() {
  51.     return (text.containsBadWord() || text.contains('udrydde')) && (text.contains('indvandrere') || text.containsIslamWord());
  52. };
  53. String.prototype.containsIslam = function() {
  54.     return (text.containsBadWord() || text.contains('udrydde')) && (text.contains('islam') || text.containsIslamWord());
  55. };
  56. String.prototype.containsUdrydde = function() {
  57.     return text.containsIslamWord() && text.contains('udrydde');
  58. };
  59.  
  60. for (var i = 0; i < elements.length; i++) {
  61.     var element = elements[i];
  62.  
  63.     for (var j = 0; j < element.childNodes.length; j++) {
  64.         var node = element.childNodes[j];
  65.  
  66.         if (node.nodeType === 3) {
  67.             var text = node.nodeValue;
  68.             var replacedText = text.replaceAll('Stram Kurs', 'Hjerneskadebevægelsen');
  69.  
  70.             if(replacedText.containsMuslimPlural()) {
  71.                 replacedText = replacedText.replaceAll('muslimer', 'pandekager');
  72.             }
  73.             if(replacedText.containsMuslimSingular()) {
  74.                 replacedText = replacedText.replaceAll('muslim', 'pandekage');
  75.             }
  76.             if(replacedText.containsRefugeePlural()) {
  77.                 replacedText = replacedText.replaceAll('flygtninge', 'pandekager');
  78.             }
  79.             if(replacedText.containsRefugeeSingular()) {
  80.                 replacedText = replacedText.replaceAll('flygtning', 'pandekage');
  81.             }
  82.             if(replacedText.containsImmigrantPlural()) {
  83.                 replacedText = replacedText.replaceAll('indvandrere', 'pandekager');
  84.             }
  85.             if(replacedText.containsImmigrantSingular()) {
  86.                 replacedText = replacedText.replaceAll('indvandrer', 'pandekage');
  87.             }
  88.  
  89.             if(replacedText.containsIslam()) {
  90.                 replacedText = replacedText.replaceAll('islam', 'skattejagt');
  91.             }
  92.             if(replacedText.containsUdrydde()) {
  93.                 replacedText = replacedText.replaceAll('udrydde', 'sprede');
  94.             }
  95.  
  96.            
  97.             replacedText = replacedText.replaceAll('Paludan', 'Klump');
  98.  
  99.             if (replacedText !== text) {
  100.                 element.replaceChild(document.createTextNode(replacedText), node);
  101.             }
  102.         }
  103.     }
  104. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top