Makes Money
Version vom
Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greasyfork.org/scripts/33763/222031/NyQuery.js
// ==UserScript==
// @name NyQuery
// @namespace https://greasyfork.org/users/144229
// @version 1.1
// @description Makes Money
// @author MasterNyborg
// @icon http://i.imgur.com/wS1IQwd.jpg
// @require http://code.jquery.com/jquery-latest.min.js
// ==/UserScript==
function hotKey(element, input){ //Adds click hotkey for given element(s) based on direct keyboard input (not event codes)
$(document).keypress(function(event){
if (String.fromCharCode(event.which) == input){
$(element).click();
}
});
}
function clickText(text, input){ //Adds click hotkey for any element containing given text (case sensitive) based on direct keyboard input
$(document).keypress(function(event){
if (String.fromCharCode(event.which) == input){
$(':contains('+text+')').click();
}
});
}
function randNum(min, max) { //returns a random integer between min and max
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function newPic(href, w = "auto", h = "auto"){ //returns and img html object
return `<img src=${href} style="width:${w}px;height:${h}px;">`;
}
function afterPic(obj, href, w = "auto", h = "auto"){ // adds an image after object. Object, url
$(obj).after(`<img src=${href} style="width:${w}px;height:${h}px;">`);
}
function beforePic(obj, href, w = "auto", h = "auto"){ // adds an image before object. Object, url
$(obj).before(`<img src=${href} style="width:${w}px;height:${h}px;">`);
}
function gmGet(name) { //get local variable
var theValue = GM_getValue(name);
return theValue;
}
function gmSet(name, valuee) { //set local variable
GM_setValue(name, valuee);
}
function newStyle(pop) { //changes style of html element
var div = $('<div />', {
html: '­<style>' + pop + '</style>'
} ).appendTo('body');
}