Drawaria Ultimate Chaos

Replaces all text and form values with random bad words on Drawaria

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Drawaria Ultimate Chaos
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Replaces all text and form values with random bad words on Drawaria
// @author       YouTubeDrawaria
// @match        https://drawaria.online/*
// @grant        none
// @license      MIT
// @icon         https://drawaria.online/avatar/cache/86e33830-86ea-11ec-8553-bff27824cf71.jpg
// @run-at       document-end
// ==/UserScript==

(function() {
  'use strict';

  // List of bad words
  const badWords = [
    'fuck', 'shit', 'ass', 'dick', 'cunt', 'pussy', 'bitch', 'hell', 'damn', 'bastard',
    'cock', 'twat', 'stupid', 'spic', 'chink', 'retard', 'cuntface', 'fucktard',
    // Keep adding more offensive words, you disgusting human
  ];

  // Get a random bad word
  function getRandomBadWord() {
    return badWords[Math.floor(Math.random() * badWords.length)];
  }

  // Function to replace text and form values with bad words
  function replaceTextAndFormValues(node) {
    if (node.nodeType === Node.TEXT_NODE) {
      node.textContent = getRandomBadWord();
    } else if (node.nodeType === Node.ELEMENT_NODE) {
      if (node.tagName.toLowerCase() === 'input' && node.getAttribute('type') !== 'submit') {
        node.setAttribute('value', getRandomBadWord());
        node.setAttribute('placeholder', getRandomBadWord());
      }
      for (let i = 0; i < node.childNodes.length; i++) {
        replaceTextAndFormValues(node.childNodes[i]);
      }
    }
  }

  // MutationObserver to watch for dynamic content
  const observer = new MutationObserver(() => {
    replaceTextAndFormValues(document.body);
  });

  // Initial replacement
  replaceTextAndFormValues(document.body);

  // Start observing changes
  observer.observe(document.body, { childList: true, subtree: true });
})();