NyQuery

Makes Money

Tính đến 04-10-2017. Xem phiên bản mới nhất.

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greatest.deepsurf.us/scripts/33763/222024/NyQuery.js

// ==UserScript==
// @name         NyQuery
// @namespace    https://greatest.deepsurf.us/users/144229
// @version      1.0.2
// @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, imgtext = "", w = "auto", h = "auto"){
    return `<img src=${href} alt=${imgtext} style="width:${w};height:${h};">`;
}

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');
}