above 0.5

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 यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         above 0.5
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       botclimber
// @match        https://www.betclic.pt/futebol-s1/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

        setTimeout(function(){ judge(); }, 1500);

    function judge(){
        var more = document.getElementsByClassName("seeMoreButton prebootFreeze ng-star-inserted");
        if(more.length > 0) more[0].click();

        setTimeout(function(){
            var content = document.getElementsByClassName("oddButtonWrapper prebootFreeze ng-trigger ng-trigger-oddsStateAnimation"),aux = -1, size = (content.length > 24)? 24 : 0;

            for(var j = 3; j < size; j++){

                var odd = parseFloat(content[j].getElementsByClassName("oddValue")[0].textContent.replace(',','.'));

                if( !((content[j].title).localeCompare("Acima de 0.5")) ){

                    //console.log(content[j].title+" | "+odd+"| "+content[j+1].title+" | "+odd1);
                    if( (odd > 1.04 && odd < 1.11)){ aux = j; break;}

                }
            }

            // click
            if(aux > -1){
                content[aux].click();
                var dot = localStorage.getItem("dot");
                dot = (!dot)? 1 : dot;

                dot = (dot * parseFloat(content[aux].textContent.replace(',','.')).toFixed(2) ).toFixed(2);

                if(dot >= 2.00){ localStorage.setItem("ctr_cl", 0); localStorage.setItem("dot", 1); }
                else localStorage.setItem("dot", dot);

            }else{
                var ctr = parseInt(localStorage.getItem("ctr_cl"));
                ctr = (ctr * 1) + 1;
                localStorage.setItem("ctr_cl", ctr);
            }

            window.location.href = "https://www.betclic.pt/futebol-s1";
        }, 1000);
    }

})();