Skip to content

Instantly share code, notes, and snippets.

Lukas Cerny lukasotocerny

Block or report user

Report or block lukasotocerny

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.