Skip to content

Commit

Permalink
don't use mobile view for iPad
Browse files Browse the repository at this point in the history
  • Loading branch information
nbarkhina committed Apr 8, 2024
1 parent aca7b98 commit d9882cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dist/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ class MyClass {
{
setTimeout(() => {
myClass.loadCloud();

myClass.afterRun();
}, 500);
}

Expand All @@ -182,7 +184,9 @@ class MyClass {
}

detectMobile(){
if (navigator.userAgent.toLocaleLowerCase().includes('iphone') || navigator.userAgent.toLocaleLowerCase().includes('ipad'))
let isIphone = navigator.userAgent.toLocaleLowerCase().includes('iphone');
let isIpad = navigator.userAgent.toLocaleLowerCase().includes('ipad');
if (isIphone || isIpad)
{
this.iosMode = true;
try {
Expand All @@ -197,7 +201,7 @@ class MyClass {
// this.rivetsData.iosShowWarning = true;
// }
}
if (window.innerWidth < 600 || this.iosMode)
if (window.innerWidth < 600 || isIphone)
this.mobileMode = true;
else
this.mobileMode = false;
Expand Down Expand Up @@ -442,6 +446,10 @@ class MyClass {
//add any overriding logic here before the emulator starts
}

afterRun(){
//add any overriding logic here after the emulator starts
}

WriteConfigFile()
{
let configString = "";
Expand Down

0 comments on commit d9882cd

Please sign in to comment.