Mercurial > bugzilla-dashboard
view js/cache.js @ 19:42d621a98c93
Some CSS fixes, added instructions for bug-filer.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 10 Mar 2010 12:56:16 -0800 |
parents | b2e0ea0178fb |
children |
line wrap: on
line source
// Really simple JSON cache that uses a form field as // a back-end. function buildCache(selector) { var data = {}; var json = $(selector).val(); if (json.length) data = JSON.parse(json); return { set: function set(key, value) { data[key] = value; $(selector).val(JSON.stringify(data)); }, get: function get(key) { return data[key]; } }; }