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
สร้างเมื่อ
15-06-2015
อัปเดตเมื่อ
15-06-2015
Size
1.39 กิโลไบต์
สัญญาอนุญาต
ไม่มี

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.