mik13ST / csgoprices.com bot

// ==UserScript==
// @name         csgoprices.com bot
// @version      0.4
// @description  now works at leagueprizes.com as well, max time increased to 10m because of really slow computers or just because I want it that way :D
// @author       mik13ST (ЖНИК)
// @match        http://csgoprizes.com/get-tickets
// @match        http://leagueprizes.com/get-tickets
// @grant        none
// ==/UserScript==
timestamp=Date.now();
timeout1=setTimeout(function() {location.reload();},600000);
document.getElementsByTagName("iframe")[0].outerHTML="";
document.getElementsByTagName("iframe")[0].outerHTML="";
document.getElementById("pub").innerHTML=""; 
$("#karambit-ads-contest")[0].outerHTML="";
text1="reloadin' in:<br />";
text2="s<br />or after it adds the tickets";

document.body.innerHTML+='<div id="info" style="opacity:.90;z-index: 10000;position: fixed;right: 20px;top: 20px;background-color: darkcyan;width: 200px;text-align: center;border-radius: 20px; padding:10px;">nothin\' interesting</div>';
if (document.getElementById("userCurrentTickets")!=null) {
    tickets=document.getElementById("userCurrentTickets").innerHTML;
    timeout2=setTimeout(function() {setInterval(function() {if (parseInt(tickets)==(parseInt(document.getElementById("userCurrentTickets").innerHTML)-3)) {location.reload();}},1000);},110000);
} else {
    text1="sometin'z wrong<br />gonna reload in:"
    text2="s<br /> ... and we will see"
}
timestamp=Date.now();
infoupdater=setInterval(function() {document.getElementById("info").innerHTML=text1+Math.floor((600)-(Date.now()-timestamp)/1000)+text2;},1000);