rabbit auto big

try to take over the world!

Version au 22/07/2017. Voir la dernière version.

// ==UserScript==
// @name         rabbit auto big
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to take over the world!
// @author       You
// @match        https://www.rabb.it/*
// @grant        none
// donationsURL paypal.me/JonathanHeindl :3
// ==/UserScript==

var getter = function (string, iF) {
    var obj = this.g.I(string, iF);
    if (!obj) {
        obj = this.g.C(string, iF);
    }
    if (!obj) {
        obj = this.g.T(string, iF);
    }
    return obj;
};
getter.I = function ID(string, iF) {
    if (iF !== undefined) {
        if (iF.localName === "iframe") {
            return iF.contentDocument.getElementById(string);
        }
        return undefined;
    }
    return document.getElementById(string);
};
getter.C = function className(string, iF) {
    var list;
    if (iF !== undefined) {
        if (iF.localName === "iframe") {
            list = iF.contentDocument.getElementsByClassName(string);
        } else {
            list = iF.getElementsByClassName(string);
        }
    } else {
        list = document.getElementsByClassName(string);
    }
    if (list.length === 1) {
        return list[0];
    } else if (list.length === 0) {
        return undefined;
    }
    return list;
};
getter.T = function tag(string, iF) {
    var list;
    if (iF !== undefined) {
        if (iF.localName === "iframe") {
            list = iF.contentDocument.getElementsByTagName(string);
        } else {
            list = iF.getElementsByTagName(string);
        }
    } else {
        list = document.getElementsByTagName(string);
    }
    if (list.length === 1) {
        return list[0];
    } else if (list.length === 0) {
        return undefined;
    }
    return list;
};

var sc={
    g:getter
};
(function() {
    'use strict';
    var lastmove = new Date().valueOf();
    var hidden = false;
    document.onmousemove = function (e) {
        lastmove = new Date().valueOf();
        if (hidden === true) {
            show();
        }
    };
    function hide() {
        var barbtn = sc.g("toolbarButton moreButton");
        if (barbtn) {
            barbtn.click();
        }
        setTimeout(function () {
            var bbl = sc.g("toolbarMenuItem hideBubblesItem off");
            if (bbl) {
                bbl.click();
            }
            setTimeout(function () {
                var barbtn = sc.g("toolbarButton moreButton");
                if (barbtn) {
                    //barbtn.click();
                }
                setTimeout(function () {
                    var fs=sc.g("toolbarMenuItem fullscreenItem off");
                    if(fs){
                       //fs.click(); 
                    }
                }, 10);
            }, 200);
        }, 10);
        hidden = true;
    }
    function show() {
        var barbtn = sc.g("toolbarButton moreButton");
        if (barbtn) {
            barbtn.click();
        }
        setTimeout(function () {
            var bbl = sc.g("toolbarMenuItem hideBubblesItem on");
            if (bbl) {
                bbl.click();
            }
            setTimeout(function () {
                var barbtn = sc.g("toolbarButton moreButton");
                if (barbtn) {
                   // barbtn.click();
                }
                setTimeout(function () {
                    var fs=sc.g("toolbarMenuItem fullscreenItem on");
                    if(fs){
                      // fs.click();
                    }
                }, 10);
            }, 200);
        }, 10);
        hidden = false;
    }
    function mcheck() {
        if (new Date().valueOf() - lastmove > 2000) {
            if (hidden === false) {
                hide();
            }
        }
        setTimeout(mcheck, 2000);
    }
    setTimeout(mcheck,10000);
    // Your code here...
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。