I recently found that there are a number of ResourceLoader modules registered, both in core and extensions, that only serve to hide specific elements when the client-nojs class is present. Instead of needing to use multiple modules for this, I suggest introducing a standard class, eg mw-nojs-hidden, that has the styles
.client-nojs .mw-nojs-hidden { display: none; }
always applied, so that we don't need multiple modules for this.
Examples:
- core - mediawiki.checkboxtoggle.styles module just hides .mw-checkbox-toggle-controls from non-js views
- UniversalLanguageSelector - ext.uls.preferencespage module just hides .uls-preferences-link-wrapper from non-js views
- RevisionSlider - ext.RevisionSlider.noscript module just hides .mw-revslider-container from non-js views
- PerformanceInspector (not deployed) - ext.PerformanceInspector.noscript module just hides #t-performanceinspector from non-js views