Greasy Fork is available in English.

DataCache - Simple storage wrapper

Allows JSON data to be persisted easily by user scripts

Этот скрипт недоступен для установки пользователем. Он является библиотекой, которая подключается к другим скриптам мета-ключом // @require https://update.greasyfork.org/scripts/10443/56962/DataCache%20-%20Simple%20storage%20wrapper.js

Автор
spiralx
Версия
0.0.1.20150615033807
Создан
15.06.2015
Обновлён
15.06.2015
Лицензия
Недоступно

Automates storing data as a JSON object. Example:

var cache = new DataCache('linked-urls');

cache.setValue('moo', 'http://google.com');

var moo = cache.getValue('moo', 'DEFAULT');

// --------------------------------------------------------------------------

GM_registerMenuCommand('Edit cache', function() {
  cache.edit();
}, 'p');

Requires both GM_getValue and GM_setValue permissions to be granted to any user script that requires it.