proper cross browser dnt support
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'promise-polyfill/src/polyfill';
|
||||
import 'unfetch/polyfill';
|
||||
import { post, hook } from '../lib/web';
|
||||
import { post, hook, doNotTrack } from '../lib/web';
|
||||
|
||||
(window => {
|
||||
const {
|
||||
@@ -13,7 +13,7 @@ import { post, hook } from '../lib/web';
|
||||
|
||||
const script = document.querySelector('script[data-website-id]');
|
||||
|
||||
if (!script || navigator.doNotTrack === "1") return;
|
||||
if (!script || doNotTrack()) return;
|
||||
|
||||
const website = script.getAttribute('data-website-id');
|
||||
const hostUrl = new URL(script.src).origin;
|
||||
|
||||
Reference in New Issue
Block a user