Revert r86047 for now per CR.
authorLeo Koppelkamm <diebuche@users.mediawiki.org>
Wed, 6 Jul 2011 12:29:56 +0000 (12:29 +0000)
committerLeo Koppelkamm <diebuche@users.mediawiki.org>
Wed, 6 Jul 2011 12:29:56 +0000 (12:29 +0000)
resources/mediawiki.action/mediawiki.action.history.js

index 06fb4cc..1b5b3a0 100644 (file)
@@ -48,45 +48,6 @@ jQuery( function( $ ) {
                return true;
        };
 
-       var fixCompare = function () {
-               var $diffList = $( '#pagehistory' ),
-                $histForm = $( '#mw-history-compare' ),
-                $buttons = $histForm.find( 'input.historysubmit' );
-
-               // There's only one rev, nothing to do here
-               if ( !$buttons.length ) {
-                       return false;
-               }
-               var copyAttrs = ['title', 'accesskey'];
-               $buttons.each(function() {
-                       var $button = $(this),
-                               $compareLink= $( '<a></a>', {
-                                       'class': 'compare-link',
-                                       'text': $button.val()
-                               }).button();
-                       $.each( copyAttrs, function( i, name ) {
-                               var val = $button.attr( name );
-                               if (val) {
-                                       $compareLink.attr( name, val );
-                               }
-                       });
-                       $button.replaceWith( $compareLink );
-               });
-               var updateCompare = function() {
-                       var $radio = $histForm.find( 'input[type="radio"]:checked' );
-                       var genLink = mw.config.get( 'wgScript' )
-                               + '?title=' + mw.util.wikiUrlencode( mw.config.get( 'wgPageName' ) )
-                               + '&diff=' + $radio.eq(0).val()
-                               + '&oldid=' + $radio.eq(1).val();
-                       $( '.compare-link' ).each( function() {
-                               $(this).attr('href', genLink);
-                       });
-               }
-               updateCompare();
-               $diffList.change( updateCompare );
-       };
-
        $( '#pagehistory li input[name="diff"], #pagehistory li input[name="oldid"]' ).click( updateDiffRadios );
-       fixCompare();
        updateDiffRadios();
 });
\ No newline at end of file