Skip to content

Instantly share code, notes, and snippets.

Lukas Cerny lukasotocerny

View GitHub Profile
@lukasotocerny
lukasotocerny / is-private-mode.js
Created Dec 28, 2017 — forked from jherax/is-private-mode.js
Detect if a browser is in Private Browsing mode
View is-private-mode.js
/**
* Detect if the browser is running in Private Browsing mode
*
* @export
* @returns {Promise}
*/
export default function isPrivateMode() {
return new Promise((resolve) => {
const on = () => resolve(true); // is in private mode
const off = () => resolve(false); // not private mode
You can’t perform that action at this time.