Remove dead code for "colored diff column top borders"

This code was added in 2016 via Iadf7793. The two CSS classes
.mw-revslider-older-diff-column and .mw-revslider-newer-diff-column
became unused only one month later via I317a2fc. Since then all
this is apparently dead code. There are no "top borders" on these
columns any more. Lines still appear in the same position, but as
"border-bottom" on other elements.

It really looks like we just forgot to remove this.

Change-Id: I627628fa44da96ca1f1301d3a879919e4a021e5b
这个提交包含在:
thiemowmde 2024-04-18 11:51:09 +02:00
父节点 b8f57c9d1d
当前提交 e482005b2e
共有 3 个文件被更改,包括 1 次插入36 次删除

查看文件

@ -75,9 +75,9 @@ $.extend( DiffPage.prototype, {
self.addHandlersToCoreLinks( sliderView );
// Re-trigger existing, stable core hooks under the same circumstances as in core
mw.hook( 'wikipage.content' ).fire( $contentText );
mw.hook( 'wikipage.diff' ).fire( $( document.body ).find( 'table.diff' ) );
}, function ( xhr ) {
$( 'table.diff[data-mw="interface"]' ).removeClass( 'mw-revslider-diff-loading' );
if ( xhr.statusText !== 'abort' ) {

查看文件

@ -149,45 +149,12 @@ $.extend( PointerLine.prototype, {
);
},
/**
* Adds colored top-borders for the diff columns fitting the line colors between pointers and columns
*
* @param {boolean} [show=true]
* @private
*/
addColoredColumnBorders: function ( show ) {
show = show !== false;
$( '#mw-diff-otitle1' ).toggleClass( 'mw-revslider-older-diff-column', show );
$( '#mw-diff-ntitle1' ).toggleClass( 'mw-revslider-newer-diff-column', show );
},
/**
* Remove colored top-borders for the diff columns fitting the line colors between pointers and columns
*
* @private
*/
removeColoredColumnBorders: function () {
this.addColoredColumnBorders( false );
},
/**
* Sets the hooks to draw the column borders
*
* @private
*/
setColumnBorderHooks: function () {
mw.hook( 'wikipage.diff' ).add( this.addColoredColumnBorders );
mw.hook( 'revslider.expand' ).add( this.addColoredColumnBorders );
mw.hook( 'revslider.collapse' ).add( this.removeColoredColumnBorders.bind( this ) );
},
/**
* @return {jQuery}
*/
getElement: function () {
if ( !this.$html ) {
this.initialize();
this.setColumnBorderHooks();
}
return this.$html;
}

查看文件

@ -141,11 +141,9 @@ toggleButton.connect( this, {
if ( expanded ) {
expand();
mw.track( 'counter.MediaWiki.RevisionSlider.event.expand' );
mw.hook( 'revslider.expand' ).fire();
} else {
collapse();
mw.track( 'counter.MediaWiki.RevisionSlider.event.collapse' );
mw.hook( 'revslider.collapse' ).fire();
}
}
} );