Skip to content

Commit

Permalink
Fixed browser
Browse files Browse the repository at this point in the history
  • Loading branch information
fedegratti committed Feb 20, 2024
1 parent 03ad719 commit 668f2ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ohzi-core",
"sideEffects": false,
"version": "11.2.1",
"version": "11.2.2",
"description": "OHZI Interactive Core Library",
"source": "src/index.js",
"module": "build/index.module.js",
Expand Down
8 changes: 4 additions & 4 deletions src/Browser.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

class Browser
{
async init()
async init(opr, chrome)
{
this.browser_name = '';
this.agent = window.navigator.userAgent.toLowerCase();
this.agent = navigator.userAgent.toLowerCase();

this.has_web_xr_support = 'xr' in navigator;
this.is_vr = this.has_web_xr_support && await navigator.xr.isSessionSupported('immersive-vr');
Expand All @@ -17,10 +17,10 @@ class Browser
case this.agent.indexOf('edg') > -1:
this.browser_name = 'edge_chromium';
break;
case this.agent.indexOf('opr') > -1 && !!window.opr:
case this.agent.indexOf('opr') > -1 && !!opr:
this.browser_name = 'opera';
break;
case this.agent.indexOf('chrome') > -1 && !!window.chrome:
case this.agent.indexOf('chrome') > -1 && !!chrome:
this.browser_name = 'chrome';
break;
case this.agent.indexOf('trident') > -1:
Expand Down

0 comments on commit 668f2ad

Please sign in to comment.