auto next

try to take over the world!

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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.

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

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

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.

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

// ==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);