DataCache - Simple storage wrapper

Allows JSON data to be persisted easily by user scripts

Per 15-06-2015. Zie de nieuwste versie.

Dit script moet niet direct worden geïnstalleerd - het is een bibliotheek voor andere scripts om op te nemen met de meta-richtlijn // @require https://update.greatest.deepsurf.us/scripts/10443/56962/DataCache%20-%20Simple%20storage%20wrapper.js

Maker
spiralx
Versie
0.0.1.20150615033807
Gemaakt op
15-06-2015
Bijgewerkt op
15-06-2015
Grootte
1,39 KB
Licentie
N.v.t.

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.