From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- resources/lib/jquery/jquery.jStorage.js | 20 +- resources/lib/jquery/jquery.js | 13 +- resources/lib/jquery/jquery.json.js | 199 --- resources/lib/jquery/jquery.migrate.js | 551 -------- resources/lib/jquery/jquery.qunit.css | 237 ---- resources/lib/jquery/jquery.qunit.js | 2288 ------------------------------- 6 files changed, 24 insertions(+), 3284 deletions(-) delete mode 100644 resources/lib/jquery/jquery.json.js delete mode 100644 resources/lib/jquery/jquery.migrate.js delete mode 100644 resources/lib/jquery/jquery.qunit.css delete mode 100644 resources/lib/jquery/jquery.qunit.js (limited to 'resources/lib/jquery') 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 */ +/* 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 +})(); diff --git a/resources/lib/jquery/jquery.js b/resources/lib/jquery/jquery.js index 1c3aa822..6feb1108 100644 --- a/resources/lib/jquery/jquery.js +++ b/resources/lib/jquery/jquery.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v1.11.2 + * jQuery JavaScript Library v1.11.3 * http://jquery.com/ * * Includes Sizzle.js @@ -9,7 +9,7 @@ * Released under the MIT license * http://jquery.org/license * - * Date: 2014-12-17T15:27Z + * Date: 2015-04-28T16:19Z */ (function( global, factory ) { @@ -64,7 +64,7 @@ var support = {}; var - version = "1.11.2", + version = "1.11.3", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -569,7 +569,12 @@ jQuery.each("Boolean Number String Function Array Date RegExp Object Error".spli }); function isArraylike( obj ) { - var length = obj.length, + + // Support: iOS 8.2 (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = "length" in obj && obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { diff --git a/resources/lib/jquery/jquery.json.js b/resources/lib/jquery/jquery.json.js deleted file mode 100644 index 75953f4d..00000000 --- a/resources/lib/jquery/jquery.json.js +++ /dev/null @@ -1,199 +0,0 @@ -/** - * jQuery JSON plugin 2.4.0 - * - * @author Brantley Harris, 2009-2011 - * @author Timo Tijhof, 2011-2012 - * @source This plugin is heavily influenced by MochiKit's serializeJSON, which is - * copyrighted 2005 by Bob Ippolito. - * @source Brantley Harris wrote this plugin. It is based somewhat on the JSON.org - * website's http://www.json.org/json2.js, which proclaims: - * "NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.", a sentiment that - * I uphold. - * @license MIT License - */ -(function ($) { - 'use strict'; - - var escape = /["\\\x00-\x1f\x7f-\x9f]/g, - meta = { - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - hasOwn = Object.prototype.hasOwnProperty; - - /** - * jQuery.toJSON - * Converts the given argument into a JSON representation. - * - * @param o {Mixed} The json-serializable *thing* to be converted - * - * If an object has a toJSON prototype, that will be used to get the representation. - * Non-integer/string keys are skipped in the object, as are keys that point to a - * function. - * - */ - $.toJSON = typeof JSON === 'object' && JSON.stringify ? JSON.stringify : function (o) { - if (o === null) { - return 'null'; - } - - var pairs, k, name, val, - type = $.type(o); - - if (type === 'undefined') { - return undefined; - } - - // Also covers instantiated Number and Boolean objects, - // which are typeof 'object' but thanks to $.type, we - // catch them here. I don't know whether it is right - // or wrong that instantiated primitives are not - // exported to JSON as an {"object":..}. - // We choose this path because that's what the browsers did. - if (type === 'number' || type === 'boolean') { - return String(o); - } - if (type === 'string') { - return $.quoteString(o); - } - if (typeof o.toJSON === 'function') { - return $.toJSON(o.toJSON()); - } - if (type === 'date') { - var month = o.getUTCMonth() + 1, - day = o.getUTCDate(), - year = o.getUTCFullYear(), - hours = o.getUTCHours(), - minutes = o.getUTCMinutes(), - seconds = o.getUTCSeconds(), - milli = o.getUTCMilliseconds(); - - if (month < 10) { - month = '0' + month; - } - if (day < 10) { - day = '0' + day; - } - if (hours < 10) { - hours = '0' + hours; - } - if (minutes < 10) { - minutes = '0' + minutes; - } - if (seconds < 10) { - seconds = '0' + seconds; - } - if (milli < 100) { - milli = '0' + milli; - } - if (milli < 10) { - milli = '0' + milli; - } - return '"' + year + '-' + month + '-' + day + 'T' + - hours + ':' + minutes + ':' + seconds + - '.' + milli + 'Z"'; - } - - pairs = []; - - if ($.isArray(o)) { - for (k = 0; k < o.length; k++) { - pairs.push($.toJSON(o[k]) || 'null'); - } - return '[' + pairs.join(',') + ']'; - } - - // Any other object (plain object, RegExp, ..) - // Need to do typeof instead of $.type, because we also - // want to catch non-plain objects. - if (typeof o === 'object') { - for (k in o) { - // Only include own properties, - // Filter out inherited prototypes - if (hasOwn.call(o, k)) { - // Keys must be numerical or string. Skip others - type = typeof k; - if (type === 'number') { - name = '"' + k + '"'; - } else if (type === 'string') { - name = $.quoteString(k); - } else { - continue; - } - type = typeof o[k]; - - // Invalid values like these return undefined - // from toJSON, however those object members - // shouldn't be included in the JSON string at all. - if (type !== 'function' && type !== 'undefined') { - val = $.toJSON(o[k]); - pairs.push(name + ':' + val); - } - } - } - return '{' + pairs.join(',') + '}'; - } - }; - - /** - * jQuery.evalJSON - * Evaluates a given json string. - * - * @param str {String} - */ - $.evalJSON = typeof JSON === 'object' && JSON.parse ? JSON.parse : function (str) { - /*jshint evil: true */ - return eval('(' + str + ')'); - }; - - /** - * jQuery.secureEvalJSON - * Evals JSON in a way that is *more* secure. - * - * @param str {String} - */ - $.secureEvalJSON = typeof JSON === 'object' && JSON.parse ? JSON.parse : function (str) { - var filtered = - str - .replace(/\\["\\\/bfnrtu]/g, '@') - .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') - .replace(/(?:^|:|,)(?:\s*\[)+/g, ''); - - if (/^[\],:{}\s]*$/.test(filtered)) { - /*jshint evil: true */ - return eval('(' + str + ')'); - } - throw new SyntaxError('Error parsing JSON, source is not valid.'); - }; - - /** - * jQuery.quoteString - * Returns a string-repr of a string, escaping quotes intelligently. - * Mostly a support function for toJSON. - * Examples: - * >>> jQuery.quoteString('apple') - * "apple" - * - * >>> jQuery.quoteString('"Where are we going?", she asked.') - * "\"Where are we going?\", she asked." - */ - $.quoteString = function (str) { - if (str.match(escape)) { - return '"' + str.replace(escape, function (a) { - var c = meta[a]; - if (typeof c === 'string') { - return c; - } - c = a.charCodeAt(); - return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); - }) + '"'; - } - return '"' + str + '"'; - }; - -}(jQuery)); diff --git a/resources/lib/jquery/jquery.migrate.js b/resources/lib/jquery/jquery.migrate.js deleted file mode 100644 index 5b182366..00000000 --- a/resources/lib/jquery/jquery.migrate.js +++ /dev/null @@ -1,551 +0,0 @@ -/*! - * jQuery Migrate - v1.2.1 - 2013-05-08 - * https://github.com/jquery/jquery-migrate - * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT - * - * Patched for MediaWiki to add mw.track calls. --Krinkle 2014-04-14 - */ -(function( jQuery, window, undefined ) { -// See http://bugs.jquery.com/ticket/13335 -// "use strict"; - - -var warnedAbout = {}; - -// List of warnings already given; public read only -jQuery.migrateWarnings = []; - -// Set to true to prevent console output; migrateWarnings still maintained -// jQuery.migrateMute = false; - -// Show a message on the console so devs know we're active -if ( !jQuery.migrateMute && window.console && window.console.log ) { - window.console.log("JQMIGRATE: Logging is active"); -} - -// Set to false to disable traces that appear with warnings -if ( jQuery.migrateTrace === undefined ) { - jQuery.migrateTrace = true; -} - -// Forget any warnings we've already given; public -jQuery.migrateReset = function() { - warnedAbout = {}; - jQuery.migrateWarnings.length = 0; -}; - -function migrateWarn( msg, key ) { - var console = window.console; - /* - MediaWiki patch for tracking usage. - - Custom keys: - - andSelf - - attr-pass - - attr-prop - - bind-error - - clean - - create-html - - data-events - - die - - event-ajax - - event-global - - event-hover - - event-handle - - input-type - - json-invalid - - live - - sub - - toggle-handle - - Prop keys: - - attrFn - - browser - */ - mw.track( "jquery.migrate", key || "unknown" ); - - if ( !warnedAbout[ msg ] ) { - warnedAbout[ msg ] = true; - jQuery.migrateWarnings.push( msg ); - if ( console && console.warn && !jQuery.migrateMute ) { - console.warn( "JQMIGRATE: " + msg ); - if ( jQuery.migrateTrace && console.trace ) { - console.trace(); - } - } - } -} - -function migrateWarnProp( obj, prop, value, msg, key ) { - if ( Object.defineProperty ) { - // On ES5 browsers (non-oldIE), warn if the code tries to get prop; - // allow property to be overwritten in case some other plugin wants it - try { - Object.defineProperty( obj, prop, { - configurable: true, - enumerable: true, - get: function() { - migrateWarn( msg, key || prop ); - return value; - }, - set: function( newValue ) { - migrateWarn( msg, key || prop ); - value = newValue; - } - }); - return; - } catch( err ) { - // IE8 is a dope about Object.defineProperty, can't warn there - } - } - - // Non-ES5 (or broken) browser; just set the property - jQuery._definePropertyBroken = true; - obj[ prop ] = value; -} - -if ( document.compatMode === "BackCompat" ) { - // jQuery has never supported or tested Quirks Mode - migrateWarn( "jQuery is not compatible with Quirks Mode" ); -} - - -var attrFn = jQuery( "", { size: 1 } ).attr("size") && jQuery.attrFn, - oldAttr = jQuery.attr, - valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || - function() { return null; }, - valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || - function() { return undefined; }, - rnoType = /^(?:input|button)$/i, - rnoAttrNodeType = /^[238]$/, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - ruseDefault = /^(?:checked|selected)$/i; - -// jQuery.attrFn -migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" ); - -jQuery.attr = function( elem, name, value, pass ) { - var lowerName = name.toLowerCase(), - nType = elem && elem.nodeType; - - if ( pass ) { - // Since pass is used internally, we only warn for new jQuery - // versions where there isn't a pass arg in the formal params - if ( oldAttr.length < 4 ) { - migrateWarn("jQuery.fn.attr( props, pass ) is deprecated", "attr-pass" ); - } - if ( elem && !rnoAttrNodeType.test( nType ) && - (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) { - return jQuery( elem )[ name ]( value ); - } - } - - // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking - // for disconnected elements we don't warn on $( "