Greasy Fork is available in English.

UnknownQwertyz: The Useless Web Button

The Usless Web But On All Websites?!

// ==UserScript==
// @name         UnknownQwertyz: The Useless Web Button
// @version      69.0
// @description  The Usless Web But On All Websites?!
// @namespace    https://greasyfork.org/en/users/1235981-unknownqwertyz
// @match        *://*/*
// @grant        GM_setValue
// @grant        GM_getValue
// @license      MIT
// ==/UserScript==

// Configuration
const listWebsites = [
    // List of useless websites to randomly redirect to
        "https://longdogechallenge.com/",
        "https://checkboxrace.com/",
        "https://onesquareminesweeper.com/",
        "http://heeeeeeeey.com/",
        "http://corndog.io/",
        "https://binarypiano.com/",
        "https://mondrianandme.com/",
        "https://puginarug.com",
        "http://floatingqrcode.com/",
        "https://checkboxolympics.com/",
        "https://alwaysjudgeabookbyitscover.com",
        "https://thatsthefinger.com/",
        "https://cant-not-tweet-this.com/",
        "https://cursoreffects.com",
        "http://eelslap.com/",
        "http://www.staggeringbeauty.com/",
        "http://burymewithmymoney.com/",
        "https://smashthewalls.com/",
        "https://jacksonpollock.org/",
        "http://endless.horse/",
        "http://drawing.garden/",
        "https://www.trypap.com/",
        "http://www.republiquedesmangues.fr/",
        "http://www.movenowthinklater.com/",
        "http://www.rrrgggbbb.com/",
        "http://www.koalastothemax.com/",
        "http://www.everydayim.com/",
        "http://randomcolour.com/",
        "http://cat-bounce.com/",
        "http://chrismckenzie.com/",
        "https://thezen.zone/",
        "http://ninjaflex.com/",
        "http://ihasabucket.com/",
        "http://corndogoncorndog.com/",
        "http://www.hackertyper.com/",
        "https://pointerpointer.com",
        "http://imaninja.com/",
        "http://www.partridgegetslucky.com/",
        "http://www.ismycomputeron.com/",
        "http://www.nullingthevoid.com/",
        "http://www.muchbetterthanthis.com/",
        "http://www.yesnoif.com/",
        "http://lacquerlacquer.com",
        "http://potatoortomato.com/",
        "http://iamawesome.com/",
        "https://strobe.cool/",
        "http://thisisnotajumpscare.com/",
        "http://doughnutkitten.com/",
        "http://crouton.net/",
        "http://corgiorgy.com/",
        "http://www.wutdafuk.com/",
        "http://unicodesnowmanforyou.com/",
        "http://chillestmonkey.com/",
        "http://scroll-o-meter.club/",
        "http://www.crossdivisions.com/",
        "http://tencents.info/",
        "https://boringboringboring.com/",
        "http://www.patience-is-a-virtue.org/",
        "http://pixelsfighting.com/",
        "http://isitwhite.com/",
        "https://existentialcrisis.com/",
        "http://onemillionlols.com/",
        "http://www.omfgdogs.com/",
        "http://oct82.com/",
        "http://chihuahuaspin.com/",
        "http://www.blankwindows.com/",
        "http://tunnelsnakes.com/",
        "http://www.trashloop.com/",
        "http://www.ascii-middle-finger.com/",
        "http://spaceis.cool/",
        "http://www.doublepressure.com/",
        "http://www.donothingfor2minutes.com/",
        "http://buildshruggie.com/",
        "http://buzzybuzz.biz/",
        "http://yeahlemons.com/",
        "http://wowenwilsonquiz.com",
        "https://thepigeon.org/",
        "http://notdayoftheweek.com/",
        "http://www.amialright.com/",
        "https://greatbignothing.com/",
        "https://zoomquilt.org/",
        "https://dadlaughbutton.com/",
        "https://remoji.com/",
        "http://papertoilet.com/",
        "https://loopedforinfinity.com/",
        "https://www.bouncingdvdlogo.com/",
        "https://findtheinvisiblecow.com/"
];

// Generate a random URL to redirect to
function generateRandomUrl() {
    // Function to generate a random URL from the list
    const randomIndex = Math.floor(Math.random() * listWebsites.length);
    return listWebsites[randomIndex];
}

// Create a styled button without redirection
function createStyledButton(text, clickHandler) {
    // Function to create a styled button with optional click handler
    const button = document.createElement("button");
    button.innerHTML = text;
    button.style.padding = "10px";
    button.style.fontSize = "16px";
    button.style.backgroundColor = "#0008"; // Semi-transparent black
    button.style.color = "white";
    button.style.border = "none";
    button.style.borderRadius = "20px";
    button.style.cursor = "pointer";
    button.style.border = "1px solid red";
    button.style.boxShadow = "0 0 10px red";

    // Check if the button should have a click handler
    if (clickHandler) {
        button.addEventListener("click", clickHandler);
    }

    return button;
}

// Create a container for the buttons and make it positioned at the center bottom
function createButtonContainer() {
    // Function to create a container for the buttons and position it at the center bottom
    const container = document.createElement("div");
    container.style.position = "fixed";
    container.style.bottom = "10px";
    container.style.left = "50%";
    container.style.transform = "translateX(-50%)";
    container.style.zIndex = "9999";
    container.style.userSelect = "none";

    // Create the main button
    const mainButton = createStyledButton("Take me to a useless website", function () {
        // Show the "Please" button when the main button is clicked
        nomannersButton.style.display = "block"; // Show the No Manners button
    });

    // Create the "Please" button
    const pleaseButton = createStyledButton("Please", function () {
        // Add any functionality you want for the "Please" button here
        console.log("Please button clicked!");

        // Show an alert saying "Thank you"
        alert("Thank you! NOW LEARN SOME MANNERS >:0");

        // Optional: Redirect functionality for the "Please" button
        const randomUrl = generateRandomUrl();
        window.location.href = randomUrl;
    });

    // Create the "No Manners Button"
    const nomannersButton = createStyledButton("Say Please >:(", function () {
        // Show the "Please" button when the main button is clicked
        pleaseButton.style.display = "block";
        // Add any functionality you want for the "No Manners Button" here
        console.log("No Manners Button clicked!");

        // You can customize the functionality of this button as needed
        // For example, you can open a specific website or perform an action
    });

    // Hide the "Please" and "Say Please >:(" by default
    pleaseButton.style.display = "none";
    nomannersButton.style.display = "none";

    // Append buttons to the container
    container.appendChild(mainButton);
    container.appendChild(nomannersButton);
    container.appendChild(pleaseButton);

    // Append container to the document body
    document.body.appendChild(container);
}

// Initial execution to create the button container
createButtonContainer();