Spam Image Button

Adds a button to spam an image all over the current website.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Spam Image Button
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Adds a button to spam an image all over the current website.
// @author       You
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Create a button
    const button = document.createElement('button');
    button.textContent = 'Click Me';
    button.style.position = 'fixed';
    button.style.top = '10px';
    button.style.left = '10px';
    button.style.zIndex = '10000';
    button.style.padding = '10px';
    button.style.fontSize = '16px';
    button.style.backgroundColor = '#007BFF';
    button.style.color = 'white';
    button.style.border = 'none';
    button.style.borderRadius = '5px';
    button.style.cursor = 'pointer';

    // Append the button to the body
    document.body.appendChild(button);

    // Image URL
    const imageUrl = 'https://i.ibb.co/x1fxQM0/IMG-0261.png';

    // Function to spam the image
    button.addEventListener('click', () => {
        for (let i = 0; i < 20; i++) { // Adjust the number of images if needed
            const img = document.createElement('img');
            img.src = imageUrl;
            img.style.position = 'absolute';
            img.style.zIndex = '9999';
            img.style.width = '100px';
            img.style.height = '100px';
            img.style.top = `${Math.random() * window.innerHeight}px`;
            img.style.left = `${Math.random() * window.innerWidth}px`;
            document.body.appendChild(img);
        }
    });
})();