RCFilters: Allow experimental live update feature to be enabled with query string...
authorRoan Kattouw <roan.kattouw@gmail.com>
Fri, 14 Jul 2017 21:35:48 +0000 (14:35 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Fri, 14 Jul 2017 21:35:48 +0000 (14:35 -0700)
For testing. Adding ?liveupdate=1 to the URL will unhide the live update button.

Bug: T167743
Change-Id: I2696da959d34adf952f7f2fa6477ab756ef259bd

resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js

index a748063..3e7a3e1 100644 (file)
                $bottom = $( '<div>' )
                        .addClass( 'mw-rcfilters-ui-filterWrapperWidget-bottom' );
 
-               if ( mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ) {
+               if (
+                       mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ||
+                       // Allow users to enable live update with ?liveupdate=1
+                       new mw.Uri().query.liveupdate
+               ) {
                        $bottom.append( this.liveUpdateButton.$element );
                }