Reverted changes

This commit is contained in:
alistair3149 2020-02-15 21:27:42 -05:00
parent a2608fc40b
commit 1b4daf957c
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C

View file

@ -22,28 +22,34 @@ class SkinCitizen extends SkinTemplate {
*/ */
public function initPage( OutputPage $out ) { public function initPage( OutputPage $out ) {
$this->out = $out; $this->out = $out;
// Responsive layout // Responsive layout
$out->addMeta( 'viewport', 'width=device-width, initial-scale=1.0' ); $out->addMeta( 'viewport', 'width=device-width, initial-scale=1.0' );
// Theme color // Theme color
$out->addMeta( 'theme-color', $this->getConfigValue( 'CitizenThemeColor' ) ?? '' ); $out->addMeta( 'theme-color', $this->getConfigValue( 'CitizenThemeColor' ) ?? '' );
// Preconnect origin // Preconnect origin
$this->addPreConnect(); $this->addPreConnect();
// Generate manifest // Generate manifest
$this->addManifest(); $this->addManifest();
// HTTP headers // HTTP headers
// CSP // CSP
$this->addCSP(); $this->addCSP();
// HSTS // HSTS
$this->addHSTS(); $this->addHSTS();
// Deny X-Frame-Options // Deny X-Frame-Options
$this->addXFrameOptions(); $this->addXFrameOptions();
// X-XSS-Protection // X-XSS-Protection
$this->addXXSSProtection(); $this->addXXSSProtection();
// Referrer policy // Referrer policy
$this->addStrictReferrerPolicy(); $this->addStrictReferrerPolicy();
// Feature policy // Feature policy
$this->addFeaturePolicy(); $this->addFeaturePolicy();
@ -206,9 +212,7 @@ class SkinCitizen extends SkinTemplate {
public function getDefaultModules() { public function getDefaultModules() {
$modules = parent::getDefaultModules(); $modules = parent::getDefaultModules();
// Use Citizen skin styles // Replace the search module
$modules['styles']['skin'][] = 'skins.citizen.styles';
// Replace search module with a custom one
$modules['search'] = 'skins.citizen.search.scripts'; $modules['search'] = 'skins.citizen.search.scripts';
return $modules; return $modules;
@ -220,10 +224,7 @@ class SkinCitizen extends SkinTemplate {
private function addModules() { private function addModules() {
$this->out->addModuleStyles( [ $this->out->addModuleStyles( [
'mediawiki.skinning.content.externallinks', 'mediawiki.skinning.content.externallinks',
] ); 'skins.citizen.styles',
$this->out->addModules( [
'skins.citizen.scripts',
'skins.citizen.icons', 'skins.citizen.icons',
'skins.citizen.icons.ca', 'skins.citizen.icons.ca',
'skins.citizen.icons.p', 'skins.citizen.icons.p',
@ -236,5 +237,9 @@ class SkinCitizen extends SkinTemplate {
'skins.citizen.icons.badges', 'skins.citizen.icons.badges',
'skins.citizen.icons.search', 'skins.citizen.icons.search',
] ); ] );
$this->out->addModules( [
'skins.citizen.scripts',
] );
} }
} }