auto next

try to take over the world!

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         auto next
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  try to take over the world!
// @author       You
// @match        https://*.protobowl.com/*
// @grant        none
// ==/UserScript==



var auto = document.createElement("p");
auto.setAttribute("id", "auto");
auto.setAttribute("style", "float: left;display: block;padding: 5px 3.5% 0px;margin-bottom:0;font-size: small font-weight: 200;color: #545454;text-shadow: 0 1px 0 #ffffff;font-family: Helvetica Neue,Helvetica,Arial,sans-serif;")
var aauto = document.createTextNode('autonext on');
auto.appendChild(aauto);
document.getElementsByClassName("row buttonbar")[0].appendChild(auto);
auto.style.display = "none"


document.addEventListener("keydown", event => {
  if (event.keyCode === 49) {
      if (auto.style.display == "none") {
          auto.style.display = 'block'
      } else {
          auto.style.display ="none"
      }
  }
});


const targetNode = document.getElementsByClassName('btn btn-info nextbtn')[0];

// Options for the observer (which mutations to observe)
const config = { attributes: true, childList: true, subtree: true };

// Callback function to execute when mutations are observed
const callback = function(mutationsList, observer) {
    // Use traditional 'for loops' for IE 11
    for(const mutation of mutationsList) {
        if (mutation.type === 'attributes') {
            if (targetNode.style.display == "inline-block" && auto.style.display == "block") {
                targetNode.click();
            }
        }
    }
};

// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);

// Start observing the target node for configured mutations
observer.observe(targetNode, config);