From 4e133f4e2eb3f0ca70e3a6bcb4ae9b1f21b2ca6e Mon Sep 17 00:00:00 2001 From: Krinkle Date: Wed, 3 Aug 2011 11:59:11 +0000 Subject: [PATCH] Fix noglobals exceptions from QUnit * Test results prior to this commit: http://i.imgur.com/m8rbk.png * http://localhost/trunkw/tests/qunit/?noglobals=1 - Missing var-statement, causes global scope implication - Missing semi colon, causing next to be global --- resources/jquery/jquery.textSelection.js | 2 +- resources/mediawiki/mediawiki.Title.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/jquery/jquery.textSelection.js b/resources/jquery/jquery.textSelection.js index b16e755663..5b3c833c76 100644 --- a/resources/jquery/jquery.textSelection.js +++ b/resources/jquery/jquery.textSelection.js @@ -454,7 +454,7 @@ scrollToCaretPosition: function( options ) { context.fn.restoreSelection(); needSave = true; } - retval = ( hasIframe ? context.fn : fn )[command].call( this, options ); + var retval = ( hasIframe ? context.fn : fn )[command].call( this, options ); if ( hasIframe && needSave ) { context.fn.saveSelection(); } diff --git a/resources/mediawiki/mediawiki.Title.js b/resources/mediawiki/mediawiki.Title.js index 96292d2241..985c5c9205 100644 --- a/resources/mediawiki/mediawiki.Title.js +++ b/resources/mediawiki/mediawiki.Title.js @@ -120,7 +120,7 @@ var Title = function( title, namespace ) { * @return {mw.Title} */ setAll = function( title, s ) { - var matches = s.match( /^(?:([^:]+):)?(.*?)(?:\.(\w{1,5}))?$/ ); + var matches = s.match( /^(?:([^:]+):)?(.*?)(?:\.(\w{1,5}))?$/ ), ns_match = getNsIdByName( matches[1] ); if ( matches.length && ns_match ) { if ( matches[1] ) { title._ns = ns_match; } -- 2.20.1