Mattflaschen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/51274


Change subject: (bug 45477) Show CSS with JS disabled.
......................................................................

(bug 45477) Show CSS with JS disabled.

Change-Id: I25f2059778910b04fc9906acceb350b2b7870376
---
M GettingStarted.hooks.php
M GettingStarted.php
M SpecialGettingStarted.php
3 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/74/51274/1

diff --git a/GettingStarted.hooks.php b/GettingStarted.hooks.php
index 2e29110..0d61eaf 100644
--- a/GettingStarted.hooks.php
+++ b/GettingStarted.hooks.php
@@ -66,6 +66,9 @@
                $welcomeCreationMsg = 'gettingstarted-msg';
                $specialGS = new SpecialGettingStarted();
                $injectHtml = $specialGS->getHtmlResult() . $injectHtml;
+
+               $wgOut->addModuleStyles( 'ext.gettingstarted.styles' );
+
                $wgOut->addModules( 'ext.gettingstarted.accountcreation' );
 
                return true;
diff --git a/GettingStarted.php b/GettingStarted.php
index 94fb93f..7b02a51 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -46,11 +46,14 @@
        ),
 ) + $gettingStartedModuleInfo;
 
+// This loads on both account creation and the special page, even if JS is off
+$wgResourceModules[ 'ext.gettingstarted.styles' ] = array(
+       'styles' => 'ext.gettingstarted.css',
+) + $gettingStartedModuleInfo;
+
 // This runs on both account creation and the special page
 $wgResourceModules[ 'ext.gettingstarted' ] = array(
        'scripts' => 'ext.gettingstarted.js',
-       'styles' => 'ext.gettingstarted.css',
-       'position' => 'top', // For CSS
        'dependencies' => array(
                'mediawiki.api',
                'user.options',
diff --git a/SpecialGettingStarted.php b/SpecialGettingStarted.php
index 4034fa3..d9b397c 100644
--- a/SpecialGettingStarted.php
+++ b/SpecialGettingStarted.php
@@ -20,6 +20,8 @@
                        $output->setPageTitle( $this->msg( 
'gettingstarted-welcomesiteuseranon', $wgSitename ) );
                }
 
+               $output->addModuleStyles( 'ext.gettingstarted.styles' );
+
                $output->addModules( array(
                                'ext.guidedTour.tour.gettingstartedpage',
                                'ext.gettingstarted'

-- 
To view, visit https://gerrit.wikimedia.org/r/51274
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25f2059778910b04fc9906acceb350b2b7870376
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: feature/gettingstartedv2
Gerrit-Owner: Mattflaschen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to