mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Merge "Stop adding the 'diffmode' parameter to the URL"
This commit is contained in:
commit
a453404bb1
|
@ -29,14 +29,13 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
function onReviewModeButtonSelectSelect( item ) {
|
function onReviewModeButtonSelectSelect( item ) {
|
||||||
var url = new URL( location.href );
|
|
||||||
|
|
||||||
var oldPageName, newPageName;
|
var oldPageName, newPageName;
|
||||||
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'ComparePages' ) {
|
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'ComparePages' ) {
|
||||||
oldPageName = newPageName = mw.config.get( 'wgRelevantPageName' );
|
oldPageName = newPageName = mw.config.get( 'wgRelevantPageName' );
|
||||||
} else {
|
} else {
|
||||||
oldPageName = url.searchParams.get( 'page1' );
|
var params = new URLSearchParams( location.search );
|
||||||
newPageName = url.searchParams.get( 'page2' );
|
oldPageName = params.get( 'page1' );
|
||||||
|
newPageName = params.get( 'page2' );
|
||||||
}
|
}
|
||||||
|
|
||||||
var mode = item.getData();
|
var mode = item.getData();
|
||||||
|
@ -93,10 +92,6 @@
|
||||||
throw error;
|
throw error;
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
url.searchParams.set( 'diffmode', mode );
|
|
||||||
history.replaceState( history.state, '', url );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onReviewModeButtonSelectChoose( item ) {
|
function onReviewModeButtonSelectChoose( item ) {
|
||||||
|
|
Loading…
Reference in a new issue