UseClix automatic views
当前为
// ==UserScript==
// @name UseClix viewer
// @namespace jorgequintt
// @version 1
// @description UseClix automatic views
// @author Jorge Quintero
// @match useclix.com/*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
/*GM_setValue("addonPower",true);
boton = document.createElement("A");
boton.href="#";
boton.setAttribute("power","");
boton.setAttribute("onclick","Swi(this);");
s=[];
s["ON"]='<div class="botonLoco" style="display:block;position:fixed;float:right;background-color:#33D6FF;height: 18px;width: 70px;bottom: 8px;right: 8px;text-align: center;border-radius: 10px;font-size: 16px;box-shadow: 0px 3px 0px #008FB2;color: white;font-family: Arial;z-index:10;">ON</div>';
s["OFF"]='<div class="botonLoco" style="display:block;position:fixed;float:right;background-color:#B0B0B0;height: 18px;width: 70px;bottom: 8px;right: 8px;text-align: center;border-radius: 10px;font-size: 16px;box-shadow: 0px 3px 0px #808080;color: white;font-family: Arial;z-index:10;">OFF</div>';
function Swi(fd){
var bb=fd.getAttribute("power");
var ty;
if(bb==="ON"){
ty=true;
boton.innerHTML=s["ON"];
}
if(bb==="OFF"){
ty=false;
boton.innerHTML=s["OFF"];
}
GM_setValue("addonPower",ty);
}
//boton.addEventListener("click",Swi);
document.body.appendChild(boton, document.body.firstChild);
if(GM_getValue("addonPower")==true){
boton.setAttribute("power","ON");
boton.innerHTML=s["ON"];
}else{
boton.setAttribute("power","OFF");
boton.innerHTML=s["OFF"];
}*/
//visor de Ads normales
if (window.location.href.indexOf("ads.php")==19){
var ads = document.getElementsByClassName("surf");
var onAds = [];
for (var i=(ads.length-1);i>=0;i--){
if(ads[i].className!=="surf image2"){
if(ads[i].className!=="surf image3"){
onAds.push(ads[i]);
}
}
}
function seeAd(n){
setTimeout(function() {onAds[n].getElementsByTagName("A")[0].click()},1000);
setTimeout(function() {onAds[n].getElementsByTagName("A")[1].click();},2000);
}
document.title="("+onAds.length+" ads restantes)";
if(onAds.length==0){
window.location = "http://useclix.com/adgrid.php";
}else{
seeAd(0);
}
}
//visor de Grids
if (window.location.href.indexOf("adgrid.php")==19){
var chances=document.getElementsByTagName("P")[1].innerText.replace("You have ","").replace(" chances out of 20 today.","");
var grids = document.getElementsByTagName("table")[0].getElementsByTagName("td");
var avGrids = [];
for (var i=(grids.length-1);i>=0;i--){
if(grids[i].className!=="usegrid_clicked"){
avGrids.push(grids[i]);
}
}
function seeGrid(n){
setTimeout(function() {avGrids[n].click()},1500);
}
var randomFromAv=Math.floor(Math.random() * avGrids.length);
document.title="("+chances+" grids restantes)";
if(chances!=="0"){seeGrid(randomFromAv);}
}
//controlador de Ads (?)
if (window.location.href.indexOf("cks.php?")==19 || window.location.href.indexOf("cksag.php?")==19){
function verifyToClose(){
if(document.getElementsByClassName("success")[0].style.display=="block"){
setTimeout(function(){document.getElementsByClassName("success")[0].getElementsByTagName("A")[0].click();},700);
}
}
setInterval(verifyToClose,1000)
}