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
作成日
2015/06/15
更新日
2015/06/15
ライセンス
不明

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.