Custom Syntax Alert

Replaces the alert message with a custom message

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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 });
})();