Skip to content

Commit

Permalink
fix DNT check
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hahn committed Aug 22, 2020
1 parent 6445702 commit 51f19e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
23 changes: 17 additions & 6 deletions lib/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,24 @@ export const hook = (_this, method, callback) => {
};

export const doNotTrack = () => {
if (window.doNotTrack || navigator.doNotTrack || navigator.msDoNotTrack || 'msTrackingProtectionEnabled' in window.external) {
if (window.doNotTrack == "1" || navigator.doNotTrack == "yes" || navigator.doNotTrack == "1" || navigator.msDoNotTrack == "1" || window.external.msTrackingProtectionEnabled()) {
return true
if (
window.doNotTrack ||
navigator.doNotTrack ||
navigator.msDoNotTrack ||
'msTrackingProtectionEnabled' in window.external
) {
if (
window.doNotTrack == '1' ||
navigator.doNotTrack == 'yes' ||
navigator.doNotTrack == '1' ||
navigator.msDoNotTrack == '1' ||
(window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled())
) {
return true;
} else {
return false
return false;
}
} else {
return false
return false;
}
}
};
2 changes: 1 addition & 1 deletion public/umami.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51f19e3

Please sign in to comment.