jenkins-bot has submitted this change and it was merged.

Change subject: Honor navigator.doNotTrack
......................................................................


Honor navigator.doNotTrack

Change-Id: I17ee55f464743580b18f6e594fdfc73a3d76f1cf
---
M modules/ext.eventLogging.core.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js
index 00e798d..ca57e5e 100644
--- a/modules/ext.eventLogging.core.js
+++ b/modules/ext.eventLogging.core.js
@@ -234,10 +234,13 @@
                 * Transfer data to a remote server by making a lightweight HTTP
                 * request to the specified URL.
                 *
+                * If the user expressed a preference not to be tracked, or if
+                * $wgEventLoggingBaseUri is unset, this method is a no-op.
+                *
                 * @param {string} url URL to request from the server.
                 * @return undefined
                 */
-               sendBeacon: !baseUrl
+               sendBeacon: /1|yes/.test( navigator.doNotTrack ) || !baseUrl
                        ? $.noop
                        : navigator.sendBeacon
                                ? function ( url ) { try { 
navigator.sendBeacon( url ); } catch ( e ) {} }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17ee55f464743580b18f6e594fdfc73a3d76f1cf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: Nuria <nu...@wikimedia.org>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
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