This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |