jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/355991 )

Change subject: Register MediaWiki:Chat.css/.js as ResourceLoaderWikiModules
......................................................................


Register MediaWiki:Chat.css/.js as ResourceLoaderWikiModules

Change-Id: I43274239a735327b8f3331a5bb0d5f58bc711f65
---
M SpecialChat.php
M extension.json
M i18n/en.json
M i18n/qqq.json
4 files changed, 25 insertions(+), 8 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SpecialChat.php b/SpecialChat.php
index 9876e4c..eb2ac0a 100644
--- a/SpecialChat.php
+++ b/SpecialChat.php
@@ -37,12 +37,16 @@
                        $template = new SpecialChatTemplate;
 
                        // Load modules via ResourceLoader
-                       $modules = array(
-                               'ext.mediawikichat.css',
+                       $out->addModules( [
                                'ext.mediawikichat.js',
-                               'mediawiki.feedback' // for the loading gif
-                       );
-                       $out->addModules( $modules );
+                               'ext.mediawikichat.site',
+                               'mediawiki.feedback'
+                       ] );
+
+                       $out->addModuleStyles( [
+                               'ext.mediawikichat.css',
+                               'ext.mediawikichat.site.styles'
+                       ] );
 
                        $out->addJsConfigVars(
                                array(
diff --git a/extension.json b/extension.json
index 9457e5c..8d74929 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
        "name": "MediaWikiChat",
-       "version": "2.20.4",
+       "version": "2.20.5",
        "author": [
                "Adam Carter/UltrasonicNXT"
        ],
@@ -103,6 +103,14 @@
                        ],
                        "dependencies": [ "mediawiki.jqueryMsg", 
"mediawiki.user", "mediawiki.util" ],
                        "position": "bottom"
+               },
+               "ext.mediawikichat.site": {
+                       "class": "ResourceLoaderWikiModule",
+                       "scripts": ["MediaWiki:Chat.js"]
+               },
+               "ext.mediawikichat.site.styles": {
+                       "class": "ResourceLoaderWikiModule",
+                       "styles": ["MediaWiki:Chat.css"]
                }
        },
        "AvailableRights": [
diff --git a/i18n/en.json b/i18n/en.json
index c30f7cc..805d25b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -99,5 +99,8 @@
 
        "chat-message-from": "Message {{GENDER:$2|from}} $1",
        "chat-private-message-from": "Private message {{GENDER:$2|from}} $1",
-       "chat-mentioned-by": "Mentioned {{GENDER:$2|by}} $1"
+       "chat-mentioned-by": "Mentioned {{GENDER:$2|by}} $1",
+
+       "chat.css": "/* CSS loaded here will affect Special:Chat only */",
+       "chat.js": "/* Any JavaScript here will be loaded for users using 
Special:Chat */"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4f790c1..8751dda 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -97,5 +97,7 @@
        "apihelp-chatsendpm-example-1": "{{doc-apihelp-example|chatsendpm}}",
        "chat-message-from": "Notification for receiving message\n* $1 sending 
user\n* $2 sending users gender",
        "chat-private-message-from": "Notification for receiving private 
message\n* $1 sending user\n* $2 sending users gender",
-       "chat-mentioned-by": "Notification for being mentioned\n* $1 mentioning 
user\n* $2 mentioning users gender"
+       "chat-mentioned-by": "Notification for being mentioned\n* $1 mentioning 
user\n* $2 mentioning users gender",
+       "chat.css": "{{optional}}\nSee also:\n* {{msg-mw|Chat.js}}",
+       "chat.js": "{{optional}}\nSee also:\n* {{msg-mw|Chat.css}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43274239a735327b8f3331a5bb0d5f58bc711f65
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: UltrasonicNXT <adamr_car...@btinternet.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to