|
79 | 79 | _pubsub_observers = {},
|
80 | 80 |
|
81 | 81 | /* skip published items older than current timestamp */
|
82 |
| - _pubsub_last = +new Date(), |
| 82 | + _pubsub_last = +new Date(), |
83 | 83 |
|
84 | 84 | /* Next check for TTL */
|
85 | 85 | _ttl_timeout,
|
|
256 | 256 | function _createPolyfillStorage(type, forceCreate){
|
257 | 257 | var _skipSave = false,
|
258 | 258 | _length = 0,
|
259 |
| - i, |
| 259 | + i, |
260 | 260 | storage,
|
261 | 261 | storage_source = {};
|
262 | 262 |
|
|
272 | 272 | return;
|
273 | 273 | }
|
274 | 274 |
|
275 |
| - // only IE6/7 from this point on |
| 275 | + // only IE6/7 from this point on |
276 | 276 | if(_backend != "userDataBehavior"){
|
277 | 277 | return;
|
278 | 278 | }
|
|
300 | 300 | storage[i] = storage_source[i];
|
301 | 301 | }
|
302 | 302 | }
|
303 |
| - |
| 303 | + |
304 | 304 | // Polyfill API
|
305 | 305 |
|
306 | 306 | /**
|
|
310 | 310 |
|
311 | 311 | /**
|
312 | 312 | * Returns the key of the nth stored value
|
313 |
| - * |
| 313 | + * |
314 | 314 | * @param {Number} n Index position
|
315 | 315 | * @return {String} Key name of the nth stored value
|
316 | 316 | */
|
|
345 | 345 | * Sets or updates value for a give key
|
346 | 346 | *
|
347 | 347 | * @param {String} key Key name to be updated
|
348 |
| - * @param {String} value String value to be stored |
| 348 | + * @param {String} value String value to be stored |
349 | 349 | */
|
350 | 350 | storage.setItem = function(key, value){
|
351 | 351 | if(typeof value == "undefined"){
|
|
365 | 365 | }
|
366 | 366 |
|
367 | 367 | storage[key] = undefined;
|
368 |
| - |
| 368 | + |
369 | 369 | _skipSave = true;
|
370 | 370 | if(key in storage){
|
371 | 371 | storage.removeAttribute(key);
|
|
783 | 783 | if(!_storage.__jstorage_meta.PubSub){
|
784 | 784 | _storage.__jstorage_meta.PubSub = [];
|
785 | 785 | }
|
786 |
| - |
| 786 | + |
787 | 787 | _storage.__jstorage_meta.PubSub.unshift([+new Date, channel, payload]);
|
788 | 788 |
|
789 | 789 | _save();
|
|
795 | 795 | * JS Implementation of MurmurHash2
|
796 | 796 | *
|
797 | 797 | * SOURCE: https://github.com/garycourt/murmurhash-js (MIT licensed)
|
798 |
| - * |
| 798 | + * |
799 | 799 | * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
800 | 800 | * @see http://github.com/garycourt/murmurhash-js
|
801 | 801 | * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
802 | 802 | * @see http://sites.google.com/site/murmurhash/
|
803 |
| - * |
| 803 | + * |
804 | 804 | * @param {string} str ASCII only
|
805 | 805 | * @param {number} seed Positive integer only
|
806 | 806 | * @return {number} 32-bit positive integer hash
|
|
812 | 812 | h = seed ^ l,
|
813 | 813 | i = 0,
|
814 | 814 | k;
|
815 |
| - |
| 815 | + |
816 | 816 | while (l >= 4) {
|
817 |
| - k = |
| 817 | + k = |
818 | 818 | ((str.charCodeAt(i) & 0xff)) |
|
819 | 819 | ((str.charCodeAt(++i) & 0xff) << 8) |
|
820 | 820 | ((str.charCodeAt(++i) & 0xff) << 16) |
|
821 | 821 | ((str.charCodeAt(++i) & 0xff) << 24);
|
822 |
| - |
| 822 | + |
823 | 823 | k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
|
824 | 824 | k ^= k >>> 24;
|
825 | 825 | k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
|
|
829 | 829 | l -= 4;
|
830 | 830 | ++i;
|
831 | 831 | }
|
832 |
| - |
| 832 | + |
833 | 833 | switch (l) {
|
834 | 834 | case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
835 | 835 | case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
|
903 | 903 | get: function(key, def){
|
904 | 904 | _checkKey(key);
|
905 | 905 | if(key in _storage){
|
906 |
| - if(_storage[key] && typeof _storage[key] == "object" && |
907 |
| - _storage[key]._is_xml && |
908 |
| - _storage[key]._is_xml){ |
| 906 | + if(_storage[key] && typeof _storage[key] == "object" && _storage[key]._is_xml) { |
909 | 907 | return _XMLService.decode(_storage[key].xml);
|
910 | 908 | }else{
|
911 | 909 | return _storage[key];
|
|
0 commit comments