GuruShots boost

Makes the boost buttons on GuruShots.com stand out more when a free boost is available.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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        GuruShots boost
// @namespace   urn://https://www.georgegillams.co.uk/greasemonkey/gurushots_boost
// @include     *gurushots.com/*
// @exclude     none
// @version     7
// @description:en	Makes the boost buttons on GuruShots.com stand out more when a free boost is available.
// @grant    		none
// @description Makes the boost buttons on GuruShots.com stand out more when a free boost is available.
// ==/UserScript==

function checkForFreeBoosts() {
  let availableBoostCount = 0;

  const allDivElements = document.getElementsByTagName('DIV');
  for (let i = 0; i < allDivElements.length; i += 1) {
    const element = allDivElements[i];
    if (element.className.includes('boost')) {
      if (
        !element.className.includes('boost--boosting') &&
        !element.className.includes('boost-state-locked') &&
        !element.className.includes('boost-state-used')
      ) {
        availableBoostCount += 1;
        element.style.backgroundColor = 'hotpink';
        element.style.color = 'white';
        element.style.borderColor = 'black';
        element.style.opacity = '1';
      }
    }
  }

  if (availableBoostCount < 1) {
    return;
  }

  for (let i = 0; i < allDivElements.length; i += 1) {
    const element = allDivElements[i];
    if (element.className === 'w-max') {
      element.style.backgroundColor = 'hotpink';
    }
  }
}

setInterval(checkForFreeBoosts, 5000);