Greasy Fork

Shined up real nice.

Greasy Fork is available in English.

TORN Script Helper by Mafia [610357]

Library helper function for Mafia's torn script

Ce script ne doit pas être installé directement. C'est une librairie destinée à être incluse dans d'autres scripts avec la méta-directive // @require https://greasyfork.org/scripts/39572-torn-script-helper-by-mafia-610357/code/TORN%20Script%20Helper%20by%20Mafia%20%5B610357%5D.js?version=637755

Publicité
Auteur
Mafia
Notes
0 0 0
Version
0.0.1.20181018031252
Créé
Mis à jour
Licence
N/A
S'applique à
Tous les sites

Description de l'auteur

commaSeparateNumber(param) - return number in seperated commas

isNull(param) - return parameter value if its a number or 0 if its null

checkAPIusage(queue) - check API usage if it will exceeding 100 request per minute for incoming que request

addAPIusage() - adding API usage by 1 for tracking API usage. this line should be put after successful request

getCookie(name) - get cookie values in variable name specified as parameter

getParameterByName(name, url) - get variable values in url pattern ex: url address bar or url in hyperlink/button

unique(list) - remove duplicate values/entries by given array list

requireAPI(callback) - use this if your script require API. It will show api form to ask API for keep in browser localstorage. If api key is valid, callback function will run your script. Refer my Pointster and Item Library script.

fetching(url, callback) - Fetch Interceptor (like ajaxComplete) to intercept fetch request by given url and call a callback function for the process

xhr(url, data, method, callback) - XHR Interceptor ($.ajaxComplete) to intercept XHR request by given url,data and method to compare and matching a condition to call a callback function for the process