} );
// Collect views
- allViews = {
+ allViews = $.extend( true, {
'default': {
title: mw.msg( 'rcfilters-filterlist-title' ),
groups: filterGroups
}
- };
-
- if ( views && mw.config.get( 'wgStructuredChangeFiltersEnableExperimentalViews' ) ) {
- // If we have extended views, add them in
- $.extend( true, allViews, views );
- }
+ }, views );
// Go over all views
$.each( allViews, function ( viewName, viewData ) {
items = [],
uri = new mw.Uri(),
$changesList = $( '.mw-changeslist' ).first().contents(),
+ experimentalViews = mw.config.get( 'wgStructuredChangeFiltersEnableExperimentalViews' ),
createFilterDataFromNumber = function ( num, convertedNumForLabel ) {
return {
name: String( num ),
};
// Prepare views
- if ( namespaceStructure ) {
+ if ( namespaceStructure && experimentalViews ) {
items = [];
$.each( namespaceStructure, function ( namespaceID, label ) {
// Build and clean up the individual namespace items definition
} ]
};
}
- if ( tagList ) {
+ if ( tagList && experimentalViews ) {
views.tags = {
title: mw.msg( 'rcfilters-view-tags' ),
trigger: '#',