correct DNT check

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/4056/head
Michael Telatynski 2017-05-27 20:56:25 +01:00
parent 61a67c52c5
commit 195fcba696
1 changed files with 1 additions and 4 deletions

View File

@ -280,10 +280,7 @@ async function loadApp() {
} else if (validBrowser) {
UpdateChecker.start();
let doNotTrack = navigator.doNotTrack;
if (typeof navigator.doNotTrack === 'string') {
doNotTrack = navigator.doNotTrack === 'yes';
}
const doNotTrack = navigator.doNotTrack === 'yes' || navigator.doNotTrack === '1' || navigator.doNotTrack === 1;
if (!doNotTrack && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) {
(function() {
const g = document.createElement('script');