NyQuery

Makes Money

As of 04. 10. 2017. See the latest version.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/33763/222030/NyQuery.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         NyQuery
// @namespace    https://greasyfork.org/users/144229
// @version      1.0.5
// @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"){
    return `<img src=${href} style="width:${w}px;height:${h}px;">`;
}

function afterPic(href, w = "auto", h = "auto"){
    $(this).after(`<img src=${href} style="width:${w}px;height:${h}px;">`);
}

function beforePic(href, w = "auto", h = "auto"){
    $(this).before(`<img src=${href} style="width:${w}px;height:${h}px;">`);
}

function gmGet(name) {
    var theValue = GM_getValue(name);
    return theValue;
}

function gmSet(name, valuee) {
    GM_setValue(name, valuee);
}

function newStyle(pop) {
    var div = $('<div />', {
        html: '&shy;<style>' + pop + '</style>'
    } ).appendTo('body');
}