summaryrefslogtreecommitdiff
path: root/resources/lib/jquery/jquery.jStorage.js
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /resources/lib/jquery/jquery.jStorage.js
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'resources/lib/jquery/jquery.jStorage.js')
-rw-r--r--resources/lib/jquery/jquery.jStorage.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/resources/lib/jquery/jquery.jStorage.js b/resources/lib/jquery/jquery.jStorage.js
index cc11aed1..45e19ac6 100644
--- a/resources/lib/jquery/jquery.jStorage.js
+++ b/resources/lib/jquery/jquery.jStorage.js
@@ -34,12 +34,15 @@
* For more information, please refer to <http://unlicense.org/>
*/
+/* global ActiveXObject: false */
+/* jshint browser: true */
+
(function() {
'use strict';
var
/* jStorage version */
- JSTORAGE_VERSION = '0.4.10',
+ JSTORAGE_VERSION = '0.4.12',
/* detect a dollar object or create one if not found */
$ = window.jQuery || window.$ || (window.$ = {}),
@@ -58,7 +61,7 @@
};
// Break if no JSON support was found
- if (!('parse' in JSON) || !('stringify' in JSON)) {
+ if (typeof JSON.parse !== 'function' || typeof JSON.stringify !== 'function') {
throw new Error('No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page');
}
@@ -536,16 +539,21 @@
return;
}
var pubelm,
- _pubsubCurrent = _pubsub_last;
+ _pubsubCurrent = _pubsub_last,
+ needFired = [];
for (i = len = _storage.__jstorage_meta.PubSub.length - 1; i >= 0; i--) {
pubelm = _storage.__jstorage_meta.PubSub[i];
if (pubelm[0] > _pubsub_last) {
_pubsubCurrent = pubelm[0];
- _fireSubscribers(pubelm[1], pubelm[2]);
+ needFired.unshift(pubelm);
}
}
+ for (i = needFired.length - 1; i >= 0; i--) {
+ _fireSubscribers(needFired[i][1], needFired[i][2]);
+ }
+
_pubsub_last = _pubsubCurrent;
}
@@ -653,8 +661,10 @@
switch (l) {
case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
+ /* falls through */
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
+ /* falls through */
case 1:
h ^= (str.charCodeAt(i) & 0xff);
h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
@@ -983,4 +993,4 @@
// Initialize jStorage
_init();
-})(); \ No newline at end of file
+})();