try to take over the world!
目前為
// ==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...
})();