mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 06:24:22 +00:00
feat(core): ✨ add config flag to disable preferences menu
This commit is contained in:
parent
b47f2658c7
commit
90890de53f
|
@ -110,6 +110,7 @@ Name | Description | Values | Default
|
|||
`$wgCitizenUseNumberFormatter` | Use NumberFormatter for site statistics, which allows formatting number in a localized way | `true` - enable; `false` - disable | `true`
|
||||
`$wgCitizenThemeColor` | The color defined in the `theme-color` meta tag | Hex color code | `#131a21`
|
||||
`$wgCitizenEnableCJKFonts` | Enable included Noto Sans CJK for wikis that serves CJK languages | `true` - enable; `false` - disable | `false`
|
||||
`$wgCitizenEnablePreferences` | Enable the preferences menu | `true` - enable; `false` - disable | `true`
|
||||
|
||||
### Search suggestions
|
||||
Name | Description | Values | Default
|
||||
|
|
|
@ -45,6 +45,7 @@ class ResourceLoaderHooks {
|
|||
Config $config
|
||||
) {
|
||||
return [
|
||||
'wgCitizenEnablePreferences' => $config->get( 'CitizenEnablePreferences' ),
|
||||
'wgCitizenSearchModule' => $config->get( 'CitizenSearchModule' ),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ function registerServiceWorker() {
|
|||
*/
|
||||
function main( window ) {
|
||||
const
|
||||
config = require( './config.json' ),
|
||||
search = require( './search.js' ),
|
||||
checkbox = require( './checkbox.js' );
|
||||
|
||||
|
@ -101,7 +102,11 @@ function main( window ) {
|
|||
sections.init();
|
||||
}
|
||||
|
||||
mw.loader.load( 'skins.citizen.preferences' );
|
||||
// Preference module
|
||||
if ( config.wgCitizenEnablePreferences === true ) {
|
||||
mw.loader.load( 'skins.citizen.preferences' );
|
||||
}
|
||||
|
||||
registerServiceWorker();
|
||||
|
||||
window.addEventListener( 'beforeunload', () => {
|
||||
|
|
|
@ -595,6 +595,12 @@
|
|||
"description": "Enable included Noto Sans CJK for wikis that serves CJK languages",
|
||||
"descriptionmsg": "citizen-config-enablecjkfonts",
|
||||
"public": true
|
||||
},
|
||||
"EnablePreferences": {
|
||||
"value": true,
|
||||
"description": "Enables or disable preferences module",
|
||||
"descriptionmsg": "citizen-config-enablepreferences",
|
||||
"public": true
|
||||
}
|
||||
},
|
||||
"manifest_version": 2
|
||||
|
|
Loading…
Reference in a new issue