Get Private Browsing Name
A micro-package (< 3kb min) that returns the current browser's name for "private browsing" (Incognito/InPrivate/Private Browsing) and phrase displayed when right clicking on a link.
Installation
Depending on your package manager of choice
yarn add get-private-browsing-name
, ornpm install get-private-browsing-name
Conceptual usage
General rule of thumb:
- Safari: Private Browsing Mode
- Gooogle Chrome: Incognito Mode
- Microsoft Edge: InPrivate Browsing Mode
- Mozilla Firefox: Private Browsing
- Opera: Private Browsing
Test cases
Run yarn test
to see test cases
Example
import getPrivateBrowsingName from 'get-private-browsing-name';
console.log(getPrivateBrowsingName());
Changelog
1.1.0
- Fixes hard crash. Adds Opera support. Fixes Chrome/Firefox-on-iOS tests.
1.0.0
- Stable release