A helper that returns true or false based on whether doNotTrack
is enabled on the browser. For more general information on DNT, visit MDN.
Install via npm: npm install @mozmeao/dnt-helper
Import the library at your applications entrypoint via require, import, or by using a global variable in your script tag:
import dntHelper from '@mozmeao/dnt-helper';
const dntHelper = require('@mozmeao/dnt-helper')
const dntHelper = window.dntHelper
- Clone this repository:
git clone https://github.com/mozmeao/dnt-helper.git
cd
intodnt-helper
- Install npm dependencies:
npm install
cd
intodemo
- Install demo dependencies:
npm install
- Start the server with
npm start
- Visit http://localhost:8080/ to view the server
The purpose of the demo is just to show if your browser has DNT enabled or disabled.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.