Merge "RCFilters: Always replaceState the URL"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 15 Jun 2017 21:27:06 +0000 (21:27 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 15 Jun 2017 21:27:07 +0000 (21:27 +0000)
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
resources/src/mediawiki.rcfilters/mw.rcfilters.init.js

index 20f28b3..95e11d5 100644 (file)
                        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 );
                }
        };
 
index fc5b221..6cd2d0b 100644 (file)
                        // 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'