From af7a195d5e07969f64e04959e3730eb2848441e3 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Tue, 15 Apr 2014 21:27:06 +0200 Subject: [PATCH] Remove redirectToFragment() from wikibits.js Replaced by module mediawiki.action.view.redirectToFragment in 1.23 Change Ic10c060c3a2cbab455348e57740fc8abdc66ff9a was deployed with wmf/1.23wmf10, which is longer ago than 30 days, so there are no longer cache entries with a call to this function. Follow-Up: Ic10c060c3a2cbab455348e57740fc8abdc66ff9a Change-Id: I3b83baa0574a43806d9eb310d5d3e73e40890913 --- skins/common/wikibits.js | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 0ccf1154a7..a7ff2da370 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -6,7 +6,6 @@ win = window, ua = navigator.userAgent.toLowerCase(), isIE6 = ( /msie ([0-9]{1,}[\.0-9]{0,})/.exec( ua ) && parseFloat( RegExp.$1 ) <= 6.0 ), - isGecko = /gecko/.test( ua ) && !/khtml|spoofer|netscape\/7\.0/.test( ua ), onloadFuncts = []; if ( mw.config.get( 'wgBreakFrames' ) ) { @@ -18,43 +17,6 @@ if ( mw.config.get( 'wgBreakFrames' ) ) { } } -/** - * Legacy function to scroll to an id while viewing the page over a redirect. - * Superseeded by module 'mediawiki.action.view.redirectToFragment' in version 1.23. - * Kepted because cache can contain still inline script calls to this function. - * Should be removed in version 1.24. - * @deprecated since 1.23 Use mediawiki.action.view.redirectToFragment instead - */ -mw.log.deprecate( win, 'redirectToFragment', function ( fragment ) { - var webKitVersion, - match = navigator.userAgent.match( /AppleWebKit\/(\d+)/ ); - if ( match ) { - webKitVersion = parseInt( match[1], 10 ); - if ( webKitVersion < 420 ) { - // Released Safari w/ WebKit 418.9.1 messes up horribly - // Nightlies of 420+ are ok - return; - } - } - if ( !win.location.hash ) { - win.location.hash = fragment; - - // Mozilla needs to wait until after load, otherwise the window doesn't - // scroll. See . - // There's no obvious way to detect this programmatically, so we use - // version-testing. If Firefox fixes the bug, they'll jump twice, but - // better twice than not at all, so make the fix hit future versions as - // well. - if ( isGecko ) { - $( function () { - if ( win.location.hash === fragment ) { - win.location.hash = fragment; - } - } ); - } - } -}, 'Use the module mediawiki.action.view.redirectToFragment instead.' ); - /** * User-agent sniffing. * To be removed in MediaWiki 1.23. -- 2.20.1