diff --git a/resources/skins.minerva.editor/init.js b/resources/skins.minerva.editor/init.js index 5a670ac..297ef75 100644 --- a/resources/skins.minerva.editor/init.js +++ b/resources/skins.minerva.editor/init.js @@ -152,9 +152,8 @@ // visualEditorDefault = veConfig && veConfig.defaultUserOptions && veConfig.defaultUserOptions.enable; // return visualEditorDefault ? 'VisualEditor' : 'SourceEditor'; return 'SourceEditor'; - } else { - return preferredEditor; } + return preferredEditor; } /** @@ -416,7 +415,9 @@ // Only load the wikitext editor on wikitext. Otherwise we'll rely on the fallback behaviour // (You can test this on MediaWiki:Common.css) ?action=edit url (T173800) return; - } else if ( !isEditingSupported ) { + } + + if ( !isEditingSupported ) { // Editing is disabled (or browser is blacklisted) updateEditPageButton( false ); showSorryToast( mw.msg( 'mobile-frontend-editor-unavailable' ) ); diff --git a/resources/skins.minerva.scripts/init.js b/resources/skins.minerva.scripts/init.js index 9c388b7..3106a1d 100644 --- a/resources/skins.minerva.scripts/init.js +++ b/resources/skins.minerva.scripts/init.js @@ -133,15 +133,15 @@ // This means MultimediaViewer has been installed and is loaded. // Avoid loading it (T169622) return $.Deferred().reject(); - } else if ( mw.loader.getState( 'mobile.mediaViewer' ) === 'ready' ) { + } + if ( mw.loader.getState( 'mobile.mediaViewer' ) === 'ready' ) { // If module already loaded, do this synchronously to avoid the event loop causing // a visible flash (see T197110) return makeImageOverlay( title ); - } else { - return loader.loadModule( 'mobile.mediaViewer' ).then( function () { - return makeImageOverlay( title ); - } ); } + return loader.loadModule( 'mobile.mediaViewer' ).then( function () { + return makeImageOverlay( title ); + } ); } // Routes diff --git a/resources/skins.minerva.scripts/pageIssues.js b/resources/skins.minerva.scripts/pageIssues.js index dabe661..835a7a4 100644 --- a/resources/skins.minerva.scripts/pageIssues.js +++ b/resources/skins.minerva.scripts/pageIssues.js @@ -218,19 +218,18 @@ * @return {jQuery.Object[]} array of all issues. */ function getIssues( section ) { - if ( section === KEYWORD_ALL_SECTIONS ) { - // Note section.all may not exist, depending on the structure of the HTML page. - // It will only exist when Minerva has been run in desktop mode. - // If it's absent, we'll reduce all the other lists into one. - return allIssues.all || Object.keys( allIssues ).reduce( - function ( all, key ) { - return all.concat( allIssues[key] ); - }, - [] - ); - } else { + if ( section !== KEYWORD_ALL_SECTIONS ) { return allIssues[section] || []; } + // Note section.all may not exist, depending on the structure of the HTML page. + // It will only exist when Minerva has been run in desktop mode. + // If it's absent, we'll reduce all the other lists into one. + return allIssues.all || Object.keys( allIssues ).reduce( + function ( all, key ) { + return all.concat( allIssues[key] ); + }, + [] + ); } /**