你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/10443-datacache-simple-storage-wrapper,源站連結 點此以跳轉

DataCache - Simple storage wrapper

Allows JSON data to be persisted easily by user scripts

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.org.cn/scripts/10443/56962/DataCache%20-%20Simple%20storage%20wrapper.js

作者
spiralx
版本
0.0.1.20150615033807
创建于
2015-06-15
更新于
2015-06-15
大小
1.4 KB
许可证
暂无

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.