Skip to content

Commit 195fcba

Browse files
committed
correct DNT check
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 61a67c5 commit 195fcba

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/vector/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,7 @@ async function loadApp() {
280280
} else if (validBrowser) {
281281
UpdateChecker.start();
282282

283-
let doNotTrack = navigator.doNotTrack;
284-
if (typeof navigator.doNotTrack === 'string') {
285-
doNotTrack = navigator.doNotTrack === 'yes';
286-
}
283+
const doNotTrack = navigator.doNotTrack === 'yes' || navigator.doNotTrack === '1' || navigator.doNotTrack === 1;
287284
if (!doNotTrack && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) {
288285
(function() {
289286
const g = document.createElement('script');

0 commit comments

Comments
 (0)