Use history.replaceState instead of history.pushState

This removes the URL with the URL parameter setlang from the history.
A click on history back doesn't show the URL parameter setlang anymore.

Change-Id: I0ea8c4508bedd9758a1cebbe8ecb2a7113bf8538
This commit is contained in:
Fomafix
2019-12-19 20:11:19 +01:00
parent 5b41346e76
commit d31fddd8e7

View File

@@ -94,7 +94,7 @@
$cancelBtn.on( 'click', function () { $cancelBtn.on( 'click', function () {
var urlWithoutSetlang = removeParam( 'setlang' ); var urlWithoutSetlang = removeParam( 'setlang' );
history.pushState( null, 'no-setlang-url', urlWithoutSetlang ); history.replaceState( null, 'no-setlang-url', urlWithoutSetlang );
ulsDialog.close(); ulsDialog.close();
} ); } );
} }