From: Krinkle Date: Sun, 31 Oct 2010 22:20:05 +0000 (+0000) Subject: Follow-up r75653 + replacing this. with mw.util X-Git-Tag: 1.31.0-rc.0~34177 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=9ffe89b5efe91576f594bd450635c98d5717b2aa;p=lhc%2Fweb%2Fwiklou.git Follow-up r75653 + replacing this. with mw.util --- diff --git a/resources/mediawiki.util/mediawiki.util.js b/resources/mediawiki.util/mediawiki.util.js index 4105786a20..9c1059d18d 100644 --- a/resources/mediawiki.util/mediawiki.util.js +++ b/resources/mediawiki.util/mediawiki.util.js @@ -15,34 +15,34 @@ // Any initialisation after the DOM is ready $(function () { - // Initiate jQuery.client.profile - $.client.profile(); + // Shortcut + var profile = $.client.profile(); // Set tooltipAccessKeyPrefix // Opera on any platform - if ( $.client.profile.name == 'opera' ) { - this.tooltipAccessKeyPrefix = 'shift-esc-'; + if ( profile.name == 'opera' ) { + mw.util.tooltipAccessKeyPrefix = 'shift-esc-'; // Chrome on any platform - } else if ( $.client.profile.name == 'chrome' ) { + } else if ( profile.name == 'chrome' ) { // Chrome on Mac or Chrome on other platform ? - this.tooltipAccessKeyPrefix = $.client.profile.platform == 'mac' ? 'ctrl-option-' : 'alt-'; + mw.util.tooltipAccessKeyPrefix = profile.platform == 'mac' ? 'ctrl-option-' : 'alt-'; // Non-Windows Safari with webkit_version > 526 - } else if ( $.client.profile.platform !== 'win' && $.client.profile.name == 'safari' && $.client.profile.layoutVersion > 526 ) { - this.tooltipAccessKeyPrefix = 'ctrl-alt-'; + } else if ( profile.platform !== 'win' && profile.name == 'safari' && profile.layoutVersion > 526 ) { + mw.util.tooltipAccessKeyPrefix = 'ctrl-alt-'; // Safari/Konqueror on any platform, or any browser on Mac (but not Safari on Windows) - } else if ( !( $.client.profile.platform == 'win' && $.client.profile.name == 'safari' ) - && ( $.client.profile.name == 'safari' - || $.client.profile.platform == 'mac' - || $.client.profile.name == 'konqueror' ) ) { - this.tooltipAccessKeyPrefix = 'ctrl-'; + } else if ( !( profile.platform == 'win' && profile.name == 'safari' ) + && ( profile.name == 'safari' + || profile.platform == 'mac' + || profile.name == 'konqueror' ) ) { + mw.util.tooltipAccessKeyPrefix = 'ctrl-'; // Firefox 2.x - } else if ( $.client.profile.name == 'firefox' && $.client.profile.versionBase == '2' ) { - this.tooltipAccessKeyPrefix = 'alt-shift-'; + } else if ( profile.name == 'firefox' && profile.versionBase == '2' ) { + mw.util.tooltipAccessKeyPrefix = 'alt-shift-'; } // Enable CheckboxShiftClick @@ -58,7 +58,6 @@ } }); - return true; } return false;