Daily Craver

enter something useful

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name       Daily Craver
// @version    0.3
// @description  enter something useful
// @match      http://ab.entertainmentcrave.com/promo*
// @match	   http://go.sportly.tv/*
// @copyright  2014+, Tjololo
// @namespace https://greasyfork.org/users/710
// ==/UserScript==

var timer = 0;

setInterval(reloadTimer,1000);
document.getElementById("hello_guide").style.display = "none";

function reloadTimer(){
    if(document.getElementById("crave_on"))
        document.getElementById("crave_on").click();
	timer++;
	if (timer%5==0)
        console.log(timer);
    if (timer < 70)
		randomNum = Math.floor(Math.random()*15 + 50);
    else
        timer = 50;

	if (timer == randomNum){
        console.log("MATCH");
        if (document.getElementsByClassName("keepCraving")[0].offsetLeft > 0){
            document.getElementsByClassName("keepCraving")[0].click();
            console.log(document.getElementsByClassName("keepCraving")[0].offsetLeft);
        }
        	if (randomNum % 2 == 0)
                document.getElementById("link_up").click();
            else
                document.getElementById("link_down").click();
            timer = 0;
        }
            
	}