Greasy Fork is available in English.

TORN userscript Helper

Library helper function for Mafia's torn script

Этот скрипт недоступен для установки пользователем. Он является библиотекой, которая подключается к другим скриптам мета-ключом // @require https://greasyfork.org/scripts/39572-torn-userscript-helper/code/TORN%20userscript%20Helper.js?version=709447

Автор
Mafia
Оценки
0 0 0
Версия
0.0.1.20190616143927
Создан
Обновлён
Лицензия
Недоступно
Работает на
Все сайты

Описание скрипта от автора

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