DataCache - Simple storage wrapper

Allows JSON data to be persisted easily by user scripts

이 스크립트는 직접 설치하는 용도가 아닙니다. 다른 스크립트에서 메타 지시문 // @require https://update.greatest.deepsurf.us/scripts/10443/56962/DataCache%20-%20Simple%20storage%20wrapper.js을(를) 사용하여 포함하는 라이브러리입니다.

작성자
spiralx
버전
0.0.1.20150615033807
생성일
2015-06-15
갱신일
2015-06-15
크기
1.39KB
라이선스
해당 없음

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.