Auto Vote

Deletes account, logs back in via Roblox, loops

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

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

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

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

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

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

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

Advertisement:

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.

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

Advertisement:

// ==UserScript==
// @name         Auto Vote
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Deletes account, logs back in via Roblox, loops
// @match        *://gag.gg/*
// @match        *://authorize.roblox.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function () {
    'use strict';

    const url = window.location.href;

    // ─── PAGE 1: Main gag.gg page — expand section and click delete ───
    if (url.includes('gag.gg') && !url.includes('deleted=1')) {

        window.confirm = () => true;

        let loop;

        function run() {
            const header = document.querySelector('button.pf__collapse-head[data-pf-collapse]');

            if (!header) {
                console.warn('[AutoDelete] Header not found');
                clearInterval(loop);
                return;
            }

            if (header.getAttribute('aria-expanded') === 'false') {
                header.click();
                console.log('[AutoDelete] Opened collapse section');
            }

            setTimeout(() => {
                const deleteBtn = document.querySelector('button.pf__btn.pf__btn--ghost[data-pf-delete]');

                if (deleteBtn) {
                    deleteBtn.click();
                    console.log('[AutoDelete] Clicked delete button');
                } else {
                    console.warn('[AutoDelete] Delete button not found');
                    clearInterval(loop);
                }
            }, 600);
        }

        window.addEventListener('load', () => {
            setTimeout(() => {
                loop = setInterval(run, 3000);
            }, 1500);
        });
    }

    // ─── PAGE 2: Redirected to gag.gg/?deleted=1 — click Roblox login ───
    if (url.includes('gag.gg') && url.includes('deleted=1')) {

        window.addEventListener('load', () => {
            setTimeout(() => {
                const loginBtn = document.querySelector('a.rbxauth__signin[data-rbxauth-signin]');

                if (loginBtn) {
                    loginBtn.click();
                    console.log('[AutoDelete] Clicked Roblox login button');
                } else {
                    console.warn('[AutoDelete] Roblox login button not found');
                }
            }, 1500);
        });
    }

    // ─── PAGE 3: Roblox authorize page — click Continue ───
    if (url.includes('authorize.roblox.com')) {

        window.addEventListener('load', () => {
            setTimeout(() => {
                // Match by text content since the class names are auto-generated and may change
                const continueBtn = [...document.querySelectorAll('button')]
                    .find(btn => btn.textContent.trim() === 'Continue');

                if (continueBtn) {
                    continueBtn.click();
                    console.log('[AutoDelete] Clicked Continue on Roblox auth page');
                } else {
                    console.warn('[AutoDelete] Continue button not found');
                }
            }, 2000); // slightly longer wait for Roblox page to fully render
        });
    }
// ─── PAGE 4: Roblox permissionRequest step — wait for timer then confirm ───
if (url.includes('authorize.roblox.com')) {
    const observer = new MutationObserver(() => {
        if (window.location.href.includes('step=permissionRequest')) {
            observer.disconnect();
            const poller = setInterval(() => {
                const confirmBtn = [...document.querySelectorAll('button')]
                    .find(btn => btn.textContent.trim() === 'Confirm and Give Access');
                if (confirmBtn) {
                    confirmBtn.click();
                    console.log('[AutoDelete] Clicked confirm on permissionRequest');
                    clearInterval(poller);
                }
            }, 500);
        }
    });

    observer.observe(document.body, { childList: true, subtree: true });
}

// ─── PAGE 5: gag.gg/?signed_in=1 — click Vote ───
if (url.includes('gag.gg') && url.includes('signed_in=1')) {

    window.addEventListener('load', () => {
        setTimeout(() => {
            const voteBtn = document.querySelector('a.launch__vote[data-launch-vote]');

            if (voteBtn) {
                voteBtn.click();
                console.log('[AutoDelete] Clicked Vote button');
            } else {
                console.warn('[AutoDelete] Vote button not found');
            }
        }, 1500);
    });
}
/// ─── PAGE 6: gag.gg/vote/ — click heart button 20 times ───
if (url.includes('gag.gg/vote')) {
    let clickCount = 0;
    const maxClicks = 20;
    window.addEventListener('load', () => {
        setTimeout(() => {
            const poller = setInterval(() => {
                if (clickCount >= maxClicks) {
                    clearInterval(poller);
                    console.log('[AutoDelete] Done — clicked heart 20 times');
                    window.location.href = 'https://gag.gg/profile/';
                    return;
                }
                const heartBtn = document.querySelector('button.swipe__btn.swipe__btn--like[data-swipe-like]');
                if (heartBtn) {
                    heartBtn.click();
                    clickCount++;
                    console.log(`[AutoDelete] Clicked heart #${clickCount}`);
                }
            }, 1500);
        }, 2000);
    });
}
})();