Wait and Redirect to autofaucet.org

Wait 10 seconds then redirect to autofaucet.org unless already there

// ==UserScript==
// @name         Wait and Redirect to autofaucet.org
// @namespace    http://tampermonkey.net/
// @version      1.3
// @description  Wait 10 seconds then redirect to autofaucet.org unless already there
// @author       👽
// @match        *://*/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    // Skip if already on the target page
    if (window.location.href.startsWith("https://autofaucet.org/earn/faucet")) {
        console.log("Already on target page. No redirection.");
        return;
    }

    console.log("Script running. Redirect will occur in 10 seconds...");

    setTimeout(() => {
        window.location.href = "https://autofaucet.org/earn/faucet";
    }, 10000); // 10,000 milliseconds = 10 seconds
})();