Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/328576 )

Change subject: Split simple and js-based styles
......................................................................

Split simple and js-based styles

Change-Id: I07b10c74cc83a126518108810eba199839443dce
---
M extension.json
M includes/Hooks.php
A modules/ext.ores.highlighter.css
M modules/ext.ores.styles.css
4 files changed, 31 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/76/328576/1

diff --git a/extension.json b/extension.json
index b12c36a..cc83d03 100644
--- a/extension.json
+++ b/extension.json
@@ -92,11 +92,19 @@
                "remoteExtPath": "ORES/modules"
        },
        "ResourceModules": {
-               "ext.ores.highlight": {
+               "ext.ores.highlighter": {
                        "position": "top",
                        "scripts": [
                                "ext.ores.highlighter.js"
                        ],
+                       "styles": "ext.ores.highlighter.css",
+                       "targets": [
+                               "desktop",
+                               "mobile"
+                       ]
+               },
+               "ext.ores.simple": {
+                       "position": "top",
                        "styles": "ext.ores.styles.css",
                        "targets": [
                                "desktop",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 3f64f3c..91bcdb9 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -538,7 +538,8 @@
                                'oresThresholds',
                                [ 'damaging' => $wgOresDamagingThresholds ]
                        );
-                       $out->addModules( 'ext.ores.highlight' );
+                       $out->addModules( 'ext.ores.highlighter' );
+                       $out->addModuleStyles( 'ext.ores.simple' );
                }
                return true;
        }
diff --git a/modules/ext.ores.highlighter.css b/modules/ext.ores.highlighter.css
new file mode 100644
index 0000000..768b5d2
--- /dev/null
+++ b/modules/ext.ores.highlighter.css
@@ -0,0 +1,20 @@
+/**
+ * Make the whole row orange
+ */
+li.damaging,
+tr.damaging {
+       background: #fef6e7;
+       line-height: 1.8;
+}
+
+.damaging[data-ores-damaging='softest'] {
+       background-color: #fc3;
+}
+
+.damaging[data-ores-damaging='soft'] {
+       background-color: #ffe18d;
+}
+
+.damaging[data-ores-damaging='hard'] {
+       background-color: #fef6e7;
+}
diff --git a/modules/ext.ores.styles.css b/modules/ext.ores.styles.css
index 358357f..158745b 100644
--- a/modules/ext.ores.styles.css
+++ b/modules/ext.ores.styles.css
@@ -5,24 +5,3 @@
        font-weight: bold;
        color: #f00;
 }
-
-/**
- * Make the whole row orange
- */
-li.damaging,
-tr.damaging {
-       background: #fef6e7;
-       line-height: 1.8;
-}
-
-.damaging[data-ores-damaging='softest'] {
-       background-color: #fc3;
-}
-
-.damaging[data-ores-damaging='soft'] {
-       background-color: #ffe18d;
-}
-
-.damaging[data-ores-damaging='hard'] {
-       background-color: #fef6e7;
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07b10c74cc83a126518108810eba199839443dce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>

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

Reply via email to