8 add: function(resource) {
9 if (!this.has(resource)) {
10 this.pending.push(resource);
15 del: function(resource) {
16 if (this.has(resource)) {
17 this.pending.splice(index, 1);
21 has: function(resource) {
22 index = jQuery.inArray( resource, this.pending );
30 return this.pending.length;
34 localStorage.setItem('pending', JSON.stringify(this.pending));
38 this.pending = JSON.parse(localStorage.getItem('pending'));
46 $(document).ready(function() {
47 // Put the object into storage
48 //localStorage.setItem('testObject', JSON.stringify(testObject));
50 // Retrieve the object from storage