correct DNT check

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-05-27 20:56:25 +01:00
parent 61a67c52c5
commit 195fcba696

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');