Skip to content

Instantly share code, notes, and snippets.

View devshark's full-sized avatar
🎯
Focusing

Anthony devshark

🎯
Focusing
View GitHub Profile
@devshark
devshark / is-private-mode.js
Created May 20, 2019 02:26 — forked from jherax/is-private-mode.js
Detect if the browser is running in Private mode
// uncomment if you are transpiling with Babel + Webpack
// const { window, document } = global;
/**
* Lightweight script to detect whether the browser is running in Private mode.
*
* You should use a polyfill for Promise.
* @see https://ourcodeworld.com/articles/read/316/top-5-best-javascript-promises-polyfills
*
* @returns {Promise}