mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-09-24 02:38:44 +00:00
ci: lint code to MediaWiki standards
Check commit and GitHub actions for more details
This commit is contained in:
parent
e9d9015d63
commit
70b74107de
|
@ -759,7 +759,7 @@ class SkinCitizen extends SkinMustache {
|
|||
* If the theme is set to auto, the theme switcher script will be added
|
||||
*
|
||||
* @param OutputPage $out
|
||||
* @param array $options
|
||||
* @param array &$options
|
||||
*/
|
||||
private function setSkinTheme( OutputPage $out, array &$options ) {
|
||||
// Set theme to site theme
|
||||
|
@ -784,10 +784,10 @@ class SkinCitizen extends SkinMustache {
|
|||
}
|
||||
|
||||
// Script content at 'skins.citizen.scripts.theme/inline.js
|
||||
$this->getOutput()->addHeadItem(
|
||||
$this->getOutput()->addHeadItem(
|
||||
'theme-switcher',
|
||||
'<script>(()=>{try{const t=document.cookie.match(/skin-citizen-theme=(dark|light|auto)/),e=null!==t?t.pop():null;null!==e&&(document.documentElement.classList.remove(...["auto","dark","light"].map(t=>"skin-citizen-"+t)),document.documentElement.classList.add("skin-citizen-"+e))}catch(t){}})();</script>'
|
||||
);
|
||||
'<script>(()=>{try{const t=document.cookie.match(/skin-citizen-theme=(dark|light|auto)/),e=null!==t?t.pop():null;null!==e&&(document.documentElement.classList.remove(...["auto","dark","light"].map(t=>"skin-citizen-"+t)),document.documentElement.classList.add("skin-citizen-"+e))}catch(t){}})();</script>'
|
||||
);
|
||||
|
||||
// Add styles and scripts module
|
||||
$options['scripts'] = array_merge(
|
||||
|
|
Loading…
Reference in a new issue