FlashIdiot

FlashingIdiot Script

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         FlashIdiot
// @namespace    http://tampermonkey.net/
// @version      V1
// @description  FlashingIdiot Script
// @author       Ludum
// @license      MIT
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const id = "FlashingIdiot";
    const title = "YOU ARE AN IDIOT";
    const count = 50; // Number of floating popups

    // HTML structure for notification popup
    const notification = `
<div class="${id}">
  <h1>${title}</h1>
</div>
`;

    const style = `
.${id} {
    position: fixed;
    width: 270px;
    height: 200px;
    background-color: red;
    border: 1px solid black;
    border-radius: 15px;
    padding: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: flash 1s infinite linear;
}

.${id}.teleport {
    animation: teleport 10s ease-in-out infinite;
}

@keyframes flash {
  0% {
    background-color: red;
  }
  50% {
    background-color: black;
  }
  100% {
    background-color: red;
  }
}

@keyframes teleport {
  0% {
    top: 50%;
    left: 50%;
  }
  25% {
    top: 5%;
    left: 95%;
  }
  50% {
    top: 95%;
    left: 5%;
  }
  75% {
    top: 5%;
    left: 95%;
  }
  100% {
    top: 95%;
    left: 5%;
  }
}
`;

    // Function to create notification popup
    function showNotification() {
        const styleNode = document.createElement("style");
        styleNode.innerHTML = style;
        document.head.appendChild(styleNode);

        const fragment = document.createDocumentFragment();
        for (let i = 0; i < count; i++) {
            const div = document.createElement("div");
            div.classList.add(id);
            div.innerHTML = notification;
            fragment.appendChild(div);
        }
        document.body.appendChild(fragment);

        Array.from(document.getElementsByClassName(id)).forEach((div) => {
            setTimeout(() => {
                div.classList.add("teleport");
            }, Math.random() * 10000);
        });

        setTimeout(() => {
            document.body.removeChild(fragment);
        }, 30000);
    }

    // Trigger the notification popup
    window.setInterval(() => {
        showNotification();
    }, 10000);
})();