UseClix viewer

UseClix automatic views

目前為 2015-11-26 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         UseClix viewer
// @namespace    jorgequintt
// @version      1.2.1
// @description  UseClix automatic views
// @author       Jorge Quintero
// @match        *://*.useclix.com/*
// @grant UnsafeWindow
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==

var username = ""; // TU USERNAME, ENTRE LAS COMILLAS
var password = ""; // TU PASSWORD, ENTRE LAS COMILLAS

//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);
    }
}
if (window.location.href.indexOf("login.php")!=-1){
    setTimeout(function() {document.getElementById("login_username").value=username;},5000);
    setTimeout(function() {document.getElementById("pwd").value=password;},6000);
    setTimeout(function() {document.getElementsByClassName("ka_button small_button small_royalblue")[0].click();},7000);
    }
if (window.location.href.indexOf("acc.php")!=-1){
    setTimeout(function() {window.location="http://useclix.com/ads.php";},30000);
    }
//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){
    unsafeWindow.document.hasFocus = function () {return true;};
    function verifyToClose(){
        if(document.getElementsByClassName("success")[0].style.display=="block"){
            unsafeWindow.document.hasFocus = function () {return true;};
            setTimeout(function(){document.getElementsByClassName("success")[0].getElementsByTagName("A")[0].click();},700);
        }
    }
    setInterval(verifyToClose,1000)
}