diff --git a/resources/skins.vector.clientPreferences/clientPreferences.js b/resources/skins.vector.clientPreferences/clientPreferences.js index a46b4bfb2..8b491dc0d 100644 --- a/resources/skins.vector.clientPreferences/clientPreferences.js +++ b/resources/skins.vector.clientPreferences/clientPreferences.js @@ -233,7 +233,9 @@ function makeFeedbackLink( betaMessageElement ) { * @param {Record} config * @param {UserPreferencesApi} userPreferences */ -function appendToggleSwitch( form, featureName, labelElement, currentValue, config, userPreferences ) { +function appendToggleSwitch( + form, featureName, labelElement, currentValue, config, userPreferences +) { const input = makeInputElement( 'checkbox', featureName, currentValue ); input.classList.add( 'cdx-toggle-switch__input' ); const switcher = document.createElement( 'span' ); @@ -300,13 +302,17 @@ function makeControl( featureName, config, userPreferences ) { switch ( type ) { case 'radio': pref.options.forEach( ( value ) => { - appendRadioToggle( form, featureName, value, String( currentValue ), config, userPreferences ); + appendRadioToggle( + form, featureName, value, String( currentValue ), config, userPreferences + ); } ); break; case 'switch': { const labelElement = document.createElement( 'label' ); labelElement.textContent = getFeatureLabelMsg( featureName ).text(); - appendToggleSwitch( form, featureName, labelElement, String( currentValue ), config, userPreferences ); + appendToggleSwitch( + form, featureName, labelElement, String( currentValue ), config, userPreferences + ); break; } default: throw new Error( 'Unknown client preference! Only switch or radio are supported.' ); diff --git a/resources/skins.vector.js/skin.js b/resources/skins.vector.js/skin.js index 3375b94f0..4479bc2a4 100644 --- a/resources/skins.vector.js/skin.js +++ b/resources/skins.vector.js/skin.js @@ -91,11 +91,15 @@ function main( window ) { // disable our night mode if so if ( isNightModeGadgetEnabled() ) { disableNightModeForGadget(); - clientPreferences.render( appearanceMenuSelector, clientPreferenceConfig, userPreferences ); + clientPreferences.render( + appearanceMenuSelector, clientPreferenceConfig, userPreferences + ); alterExclusionMessage(); removeBetaNotice(); } else { - clientPreferences.render( appearanceMenuSelector, clientPreferenceConfig, userPreferences ); + clientPreferences.render( + appearanceMenuSelector, clientPreferenceConfig, userPreferences + ); } } ); }