jenkins-bot has submitted this change and it was merged.
Change subject: Do not show campaign in an unsupported browser
......................................................................
Do not show campaign in an unsupported browser
Bug: T91487, T90722
Change-Id: Ib947f82a2b05608259b4ec09421408ee4cde5d0a
---
M ContentTranslation.hooks.php
M Resources.php
M modules/campaigns/ext.cx.campaigns.newarticle.js
3 files changed, 9 insertions(+), 1 deletion(-)
Approvals:
Amire80: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index e250e2b..9e3385f 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -135,6 +135,7 @@
$wgContentTranslationDatabase,
$wgContentTranslationSiteTemplates,
$wgContentTranslationCampaigns,
+ $wgContentTranslationBrowserBlacklist,
$wgContentTranslationTargetNamespace;
$vars['wgContentTranslationSiteTemplates'] =
$wgContentTranslationSiteTemplates;
@@ -143,6 +144,7 @@
$vars['wgContentTranslationDatabase'] =
$wgContentTranslationDatabase;
$vars['wgContentTranslationTargetNamespace'] =
$wgContentTranslationTargetNamespace;
$vars['wgContentTranslationCampaigns'] =
$wgContentTranslationCampaigns;
+ $vars['wgContentTranslationBrowserBlacklist'] =
$wgContentTranslationBrowserBlacklist;
}
/**
diff --git a/Resources.php b/Resources.php
index 895408c..b59ce9e 100644
--- a/Resources.php
+++ b/Resources.php
@@ -682,6 +682,7 @@
),
'dependencies' => array(
'mediawiki.ui.button',
+ 'jquery.client',
),
'messages' => array(
'cx-campaign-newarticle-notice',
diff --git a/modules/campaigns/ext.cx.campaigns.newarticle.js
b/modules/campaigns/ext.cx.campaigns.newarticle.js
index a370fcf..78c1862 100644
--- a/modules/campaigns/ext.cx.campaigns.newarticle.js
+++ b/modules/campaigns/ext.cx.campaigns.newarticle.js
@@ -62,6 +62,11 @@
} );
}
- $( showInvitation );
+ $( function () {
+ var blacklist = mw.config.get(
'wgContentTranslationBrowserBlacklist' );
+ if ( !$.client.test( blacklist, null, true ) ) {
+ showInvitation();
+ }
+ } );
}( jQuery, mediaWiki ) );
--
To view, visit https://gerrit.wikimedia.org/r/194295
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib947f82a2b05608259b4ec09421408ee4cde5d0a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits