Greasy Fork is available in English.
Allows JSON data to be persisted easily by user scripts
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/10443/56962/DataCache%20-%20Simple%20storage%20wrapper.js
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.