Allow users to hit 'back' button to actually go back to their
previous page, rather than use 'back' button to undo their filter
toggling before they're allowed to go back to their previous
page.
Bug: T167919
Change-Id: I171799bd5c139addebcccc4799003f040c3f119b
this.uriProcessor.getVersion( currentUri.query ) !== 2 ||
this.uriProcessor.isNewState( currentUri.query, updatedUri.query )
) {
- if ( this.initializing ) {
- // Initially, when we just build the first page load
- // out of defaults, we want to replace the history
- mw.rcfilters.UriProcessor.static.replaceState( updatedUri );
- } else {
- mw.rcfilters.UriProcessor.static.pushState( updatedUri );
- }
+ mw.rcfilters.UriProcessor.static.replaceState( updatedUri );
}
};
// Set as ready
$( '.rcfilters-head' ).addClass( 'mw-rcfilters-ui-ready' );
- window.addEventListener( 'popstate', function () {
- // Update the state of the model from the URL
- // and re-fetch results into the changes list
- controller.updateStateFromUrl();
- } );
-
$( 'a.mw-helplink' ).attr(
'href',
'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:New_filters_for_edit_review'