Daily Craver

enter something useful

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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