Skip to content
Snippets Groups Projects
Commit add97d54 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

fix DNT for firefox

parent 7eb3d35a
No related branches found
No related tags found
No related merge requests found
FROM node:alpine
RUN apk add --no-cache git && \
git clone https://github.com/mikecao/umami.git /umami && \
cd umami && \
git clone https://github.com/mikecao/umami.git /umami
WORKDIR /umami
ADD src/fix.diff /umami/fix.diff
RUN git apply fix.diff && \
npm install
ADD src/docker-entrypoint.sh /
WORKDIR /umami
......
diff --git a/lib/web.js b/lib/web.js
index 4b70389..c5c9fca 100644
--- a/lib/web.js
+++ b/lib/web.js
@@ -49,7 +49,7 @@ 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()) {
+ if (window.doNotTrack == "1" || navigator.doNotTrack == "yes" || navigator.doNotTrack == "1" || navigator.msDoNotTrack == "1" || (window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled())) {
return true
} else {
return false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment