rabbit auto big

try to take over the world!

当前为 2017-07-22 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         rabbit auto big
// @namespace    http://tampermonkey.net/
// @version      0.1
// @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) {
			switchhidden();
		}
	};
	function switchhidden() {
		var barbtn=sc.g("toolbarButton moreButton");
		if(barbtn){
			barbtn.click();
		}
		sc.g("toolbarMenu moreMenuMenuView").children[1].click();
		hidden = !hidden;
	}
	function mcheck() {
		if (new Date().valueOf() - lastmove > 2000) {
			if (hidden === false) {
				switchhidden();
			}
		}
		setTimeout(mcheck, 2000);
	}
	mcheck();
	// Your code here...
})();