DataCache - Simple storage wrapper

Allows JSON data to be persisted easily by user scripts

Ce script ne devrait pas être installé directement. C'est une librairie créée pour d'autres scripts. Elle doit être inclus avec la commande // @require https://update.greatest.deepsurf.us/scripts/10443/56962/DataCache%20-%20Simple%20storage%20wrapper.js

Auteur
spiralx
Version
0.0.1.20150615033807
Créer
2015-06-15
Mis à jour
2015-06-15
Taille
1,39 ko
Licence
S/O

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.