Greasy Fork is available in English.

Neopets: Make HTML Game Buttons Overlap

Moves elements around on certain HTML-based games so the buttons to continue playing on each level can be clicked without having to move the mouse on every new screen.

Versão de: 09/11/2025. Veja: a última versão.

Você precisará instalar uma extensão como Tampermonkey, Greasemonkey ou Violentmonkey para instalar este script.

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

Você precisará instalar uma extensão como Tampermonkey ou Violentmonkey para instalar este script.

Você precisará instalar uma extensão como Tampermonkey ou Userscripts para instalar este script.

Você precisará instalar uma extensão como o Tampermonkey para instalar este script.

Você precisará instalar um gerenciador de scripts de usuário para instalar este script.

(Eu já tenho um gerenciador de scripts de usuário, me deixe instalá-lo!)

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar uma extensão como o Stylus para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

Você precisará instalar um gerenciador de estilos de usuário para instalar este estilo.

(Eu já possuo um gerenciador de estilos de usuário, me deixar fazer a instalação!)

// ==UserScript==
// @name             Neopets: Make HTML Game Buttons Overlap
// @namespace        kmtxcxjx
// @version          1.0.0
// @description      Moves elements around on certain HTML-based games so the buttons to continue playing on each level can be clicked without having to move the mouse on every new screen.
// @match            *://www.neopets.com/games/slots.phtml?*
// @match            *://www.neopets.com/medieval/doubleornothing.phtml*
// @grant            none
// @run-at           document-end
// @icon             https://images.neopets.com/games/aaa/dailydare/2012/post/theme-icon.png
// @license          MIT
// ==/UserScript==

(function() {
    'use strict';

    // SCORCHY SLOTS
    if (window.location.href.includes('://www.neopets.com/games/slots.phtml')) {
        const form = document.querySelector('form[action="process_slots2.phtml"]');
        if (!form) return;
        const submitButton = form.querySelector('center input[type="submit"]');
        if (!submitButton) return;
        const center = submitButton.parentElement;
        const slots = form.querySelector('table');
        if (!slots) return;
        form.insertBefore(center, slots.nextSibling);
        return;
    }

    // DOUBLE OR NOTHING
    if (window.location.href.includes('://www.neopets.com/medieval/doubleornothing.phtml')) {
        // Initial start-game screen, look for high score button
        const a = document.querySelector('td.content center p a[href="//www.neopets.com/gamescores.phtml?game_id=178"]');
        if (a) {
            const center = a.parentElement.parentElement;
            // This p element contains the coin
            const p = document.querySelector('td.content p table');
            if (!p) return;
            // Move it to before the high score buttons's containing elements
            center.insertBefore(p.parentElement, a.parentElement);
            return;
        }
        // Successful flip screen, look for Continue button
        const continueButton = document.querySelector('input[value="Continue"]');
        if (continueButton) {
            // Continue button is inside a <center> tag two levels up
            const center = continueButton.parentElement.parentElement;
            // Move it to after the ruffle element, which is before the <center> that contains the above <center>
            const center2 = center.parentElement;
            center2.parentElement.insertBefore(center, center2);
            return;
        }
        // Flip screen, any round but the first - look for the coin image
        let coin = document.querySelector('img[src="//images.neopets.com/medieval/coin_heads.gif"]');
        if (!coin) coin = document.querySelector('img[src="//images.neopets.com/medieval/coin_tails.gif"]');
        if (coin) {
            // Move the p that contains the coin image to immediately after the image of the Skeith
            const p = coin.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
            const p2 = document.querySelector('center img[src="//images.neopets.com/medieval/coin_skeith.gif"]').nextSibling;
            p2.parentElement.insertBefore(p, p2);
        }
        // Lose screen, look for Try Again button
        const tryAgainButton = document.querySelector('input[value="Try again..."]');
        if (tryAgainButton) {
            const center = tryAgainButton.parentElement.parentElement;
            // Moves it before an empty <p></p> that seems to just act as a <br>
            center.parentElement.insertBefore(center, center.previousSibling);
            return;
        }
    }
})();