mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 22:35:45 +00:00
Reverted changes
This commit is contained in:
parent
a2608fc40b
commit
1b4daf957c
|
@ -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',
|
||||||
|
] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue