Custom Syntax Alert

Replaces the alert message with a custom message

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Custom Syntax Alert
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Replaces the alert message with a custom message
// @author       duckckckckck
// @match        https://www.syntax.eco/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    function replaceMessage() {
        var element = document.getElementById('websitewidemessage');
        if (element) {
            var newMessage = getRandomMessage();
            element.innerHTML = '<p>' + newMessage + '</p>';
        }
    }

    function getRandomMessage() {
        var messages = [
            "OOPSIE WOOPSIE!! Uwu We made a fucky wucky!! A wittle fucko boingo! The code monkeys at our headquarters are working VEWY HAWD to fix this!"
            // add more shit if u want lol
        ];

        var randomIndex = Math.floor(Math.random() * messages.length);
        return messages[randomIndex];
    }

    replaceMessage();

    var observer = new MutationObserver(replaceMessage);
    observer.observe(document.body, { childList: true, subtree: true });
})();