YouTube Anti Swear Word Filter

This prevents you from swearing in the Youtube Comment Section

// ==UserScript==
// @name         YouTube Anti Swear Word Filter
// @namespace    http://youtube.com/
// @version      1.1
// @license      MIT
// @description  This prevents you from swearing in the Youtube Comment Section
// @author       Magisatrate
// @match        https://www.youtube.com/*
// @grant        none
// ==/UserScript==

(function() {
  'use strict';

  const replacements = {
    "damn": "darn",
    "hell": "heck",
    "crap": "crud",
    "darn": "drat",
    "fu*k": "fudge",
    "shoot": "shucks",
    "sh*t": "shoot"
  };

  document.getElementById("contenteditable-root").addEventListener("input", function(event) {
    for (const [swearWord, replacement] of Object.entries(replacements)) {
      if (event.target.textContent.toLowerCase().includes(swearWord)) {
        event.target.textContent = event.target.textContent.toLowerCase().replace(swearWord, replacement);
      }
    }
  });

})();