Greasy Fork is available in English.

DataCache - Simple storage wrapper

Allows JSON data to be persisted easily by user scripts

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @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.