Clixgrid viewer

enter something useful

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         Clixgrid viewer
// @namespace    jorgequintt
// @version      1
// @description  enter something useful
// @author       Jorge Quintero
// @match        www.clixsense.com/*
// @grant        none
// @run-at document-end
// ==/UserScript==
if(window.location.href.indexOf("ClixGrid")==28){
    if(window.location.href.length<=36){
        //ik=0;
        chances=document.getElementById("clxs1").innerText;
        grids = document.getElementsByTagName("table")[3].getElementsByTagName("td");
        back=document.getElementById("clxpic").src;
        avGrids = [];

        for (var i=(grids.length-1);i>=0;i--){
            if(grids[i].title!=="You have already clicked this position today"){
                avGrids.push(grids[i]);
            }
        }

        function seeGrid(n){
            setTimeout(function() {avGrids[n].click()},1500);
        }      

        randomFromAv=Math.floor(Math.random() * avGrids.length);
        document.title="("+chances+" grids restantes)";
        if(chances!=="0"){seeGrid(randomFromAv);}

        function roll(){
            if(document.getElementById("clxs1").innerText!==chances){
                //ik+=1;
                chances=document.getElementById("clxs1").innerText;
                grids = document.getElementsByTagName("table")[3].getElementsByTagName("td");

                avGrids = [];

                for (var i=(grids.length-1);i>=0;i--){
                    if(grids[i].title!=="You have already clicked this position today"){
                        avGrids.push(grids[i]);
                    }
                }

                function seeGrid(n){
                    setTimeout(function(){avGrids[n].click()},2200);
                }      

                randomFromAv=Math.floor(Math.random() * avGrids.length);
                document.title="("+chances+" grids restantes)";
                if(chances!=="0"/* && (ik==1)*/){seeGrid(randomFromAv);}
            }
            back=document.getElementById("clxpic").src;
            //if(ik==2){ik=0;}
        }

        setInterval(roll,100);
    }else if(window.location.href.length>36){
        function check(){
            if(!document.getElementsByClassName("msgx")[0]){
            }else{
                window.close();
            }
        }
        setInterval(check,500)
    }
}