Skip to content

Instantly share code, notes, and snippets.

Choy-lingling

Block or report user

Report or block Choy-lingling

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
@Choy-lingling
Choy-lingling / is-private-mode.js
Last active Aug 29, 2019 — forked from jherax/is-private-mode.js
Detect if the browser is running in Private mode (Promise based)
View is-private-mode.js
// uncomment if you are transpiling with Babel + Webpack
// const { window, document } = global;
/**
* Lightweight script to detect whether the browser is running in Private mode.
* @returns {Promise}
*
* Live demo:
* @see http://live.datatables.net/piduzelo/1
*
* This snippet uses ES2015 syntax. If you want to run it in old browsers, transpile it with Babel:
You can’t perform that action at this time.