Remove redirectToFragment() from wikibits.js
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 15 Apr 2014 19:27:06 +0000 (21:27 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Tue, 15 Apr 2014 19:27:06 +0000 (21:27 +0200)
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

index 0ccf115..a7ff2da 100644 (file)
@@ -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 <https://bugzilla.mozilla.org/show_bug.cgi?id=516293>.
-               // 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.