From fda55e2ab18beba6bf5462dd4fcb71d49ba8184d Mon Sep 17 00:00:00 2001 From: Fomafix Date: Thu, 15 Sep 2016 17:51:51 +0200 Subject: [PATCH] Integrate ext.uls.nojs into ext.uls.pt The CSS hiding for non-JavaScript clients is only necessary when the buttons get added. Change-Id: I6e43e39d29c093a19f3e8355d657f162f9a62736 --- UniversalLanguageSelector.hooks.php | 3 --- extension.json | 6 ------ resources/css/ext.uls.nojs.css | 4 ---- resources/css/ext.uls.pt.less | 5 +++++ 4 files changed, 5 insertions(+), 13 deletions(-) delete mode 100644 resources/css/ext.uls.nojs.css diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index a56d498c..fed40655 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -105,9 +105,6 @@ class UniversalLanguageSelectorHooks { public static function addModules( $out, $skin ) { global $wgULSPosition, $wgULSGeoService, $wgULSEventLogging; - // Load the style for users without JS, to hide the useless links - $out->addModuleStyles( 'ext.uls.nojs' ); - // If EventLogging integration is enabled, load the schema module // and the event logging functions module if ( $wgULSEventLogging ) { diff --git a/extension.json b/extension.json index 782ee881..cb5eff19 100644 --- a/extension.json +++ b/extension.json @@ -151,12 +151,6 @@ "localBasePath": "resources", "remoteExtPath": "UniversalLanguageSelector/resources" }, - "ext.uls.nojs": { - "styles": "css/ext.uls.nojs.css", - "position": "top", - "localBasePath": "resources", - "remoteExtPath": "UniversalLanguageSelector/resources" - }, "ext.uls.init": { "targets": [ "desktop" ], "dependencies": [ "ext.uls.common" ] diff --git a/resources/css/ext.uls.nojs.css b/resources/css/ext.uls.nojs.css deleted file mode 100644 index 10c965c2..00000000 --- a/resources/css/ext.uls.nojs.css +++ /dev/null @@ -1,4 +0,0 @@ -/* Don't show it to users who disabled JS */ -.client-nojs #pt-uls { /* stylelint-disable-line selector-no-id */ - display: none; -} diff --git a/resources/css/ext.uls.pt.less b/resources/css/ext.uls.pt.less index 821e31e3..788266a9 100644 --- a/resources/css/ext.uls.pt.less +++ b/resources/css/ext.uls.pt.less @@ -56,3 +56,8 @@ body.rtl li#pt-uls { #uls-settings-block div.input-settings-block:hover { color: #252525; } + +/* Don't show it to users who disabled JS */ +.client-nojs #pt-uls { + display: none; +}