Skip to content

Commit

Permalink
fixed detectIncognito variable being stripped from window in cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe12387 committed Mar 13, 2024
1 parent 3c4eea5 commit 4c47598
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/detectIncognito.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
*
* detectIncognito v1.3.4
* detectIncognito v1.3.5
*
* https://github.com/Joe12387/detectIncognito
*
Expand Down
4 changes: 2 additions & 2 deletions dist/detectIncognito.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/detectIncognito.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,7 @@ function detectIncognito() {
});
}
exports.detectIncognito = detectIncognito;
if (typeof window !== 'undefined') {
window.detectIncognito = detectIncognito;
}
exports["default"] = detectIncognito;
4 changes: 2 additions & 2 deletions dist/es5/detectIncognito.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "detectincognitojs",
"version": "1.3.4",
"version": "1.3.5",
"description": "detectIncognito.js can be used to detect incognito mode & other private browsing modes on most modern browsers as of 2024.",
"main": "./dist/detectIncognito.js",
"module": "./dist/detectIncognito.esm.js",
Expand Down
6 changes: 5 additions & 1 deletion src/detectIncognito.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
*
* detectIncognito v1.3.4
* detectIncognito v1.3.5
*
* https://github.com/Joe12387/detectIncognito
*
Expand Down Expand Up @@ -256,4 +256,8 @@ export async function detectIncognito(): Promise<{ isPrivate: boolean; browserNa
})
}

if (typeof window !== 'undefined') {
window.detectIncognito = detectIncognito;
}

export default detectIncognito;

0 comments on commit 4c47598

Please sign in to comment.