From cdbf91c89fa9038dc63179fa93548d26c4186048 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 3 Mar 2019 01:22:45 +0000 Subject: [PATCH] resources: Remove 'jquery.xmldom' module Added in r93908 (2011, aa1bc6f742c0), for use by UploadWizard, but as far as I can tell this never happened, and it's not in use currently anywhere in Wikimedia Git or elsewhere indexed by Codesearch. It's never been updated or otherwise seen maintenance, and seems obsolete with native browser features nowadays. Bug: T202154 Change-Id: I6eccf4f488b6e8d7afa5eb81505895d0729cbfea --- RELEASE-NOTES-1.33 | 1 + resources/Resources.php | 3 --- resources/lib/jquery.xmldom.js | 46 ---------------------------------- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 resources/lib/jquery.xmldom.js diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 515407771f..47f9226205 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -267,6 +267,7 @@ because of Phabricator reports. * MessageBlobStore::__construct() now requires its $rl parameter. * Second parameter to Sanitizer::escapeIdReferenceList() (deprecated in 1.31) has been removed. +* The 'jquery.xmldom' module has been removed. === Deprecations in 1.33 === * The configuration option $wgUseESI has been deprecated, and is expected diff --git a/resources/Resources.php b/resources/Resources.php index 7c6682ebc9..06fd72d2a1 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -343,9 +343,6 @@ return [ 'scripts' => 'resources/lib/jquery.ba-throttle-debounce.js', 'targets' => [ 'desktop', 'mobile' ], ], - 'jquery.xmldom' => [ - 'scripts' => 'resources/lib/jquery.xmldom.js', - ], /* jQuery Tipsy */ diff --git a/resources/lib/jquery.xmldom.js b/resources/lib/jquery.xmldom.js deleted file mode 100644 index 85d0083d22..0000000000 --- a/resources/lib/jquery.xmldom.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * jQuery xmlDOM Plugin v1.0 - * http://outwestmedia.com/jquery-plugins/xmldom/ - * - * Released: 2009-04-06 - * Version: 1.0 - * - * Copyright (c) 2009 Jonathan Sharp, Out West Media LLC. - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - */ -(function($) { - // IE DOMParser wrapper - if ( window['DOMParser'] == undefined && window.ActiveXObject ) { - DOMParser = function() { }; - DOMParser.prototype.parseFromString = function( xmlString ) { - var doc = new ActiveXObject('Microsoft.XMLDOM'); - doc.async = 'false'; - doc.loadXML( xmlString ); - return doc; - }; - } - - $.xmlDOM = function(xml, onErrorFn) { - try { - var xmlDoc = ( new DOMParser() ).parseFromString( xml, 'text/xml' ); - if ( $.isXMLDoc( xmlDoc ) ) { - var err = $('parsererror', xmlDoc); - if ( err.length == 1 ) { - throw('Error: ' + $(xmlDoc).text() ); - } - } else { - throw('Unable to parse XML'); - } - } catch( e ) { - var msg = ( e.name == undefined ? e : e.name + ': ' + e.message ); - if ( $.isFunction( onErrorFn ) ) { - onErrorFn( msg ); - } else { - $(document).trigger('xmlParseError', [ msg ]); - } - return $([]); - } - return $( xmlDoc ); - }; -})(jQuery); \ No newline at end of file -- 2.20.1