Преглед изворни кода

success to get the version infomation used by the user

kaori пре 5 година
родитељ
комит
a86362937e
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/client/js/services/AppContainer.js

+ 3 - 0
src/client/js/services/AppContainer.js

@@ -41,6 +41,9 @@ export default class AppContainer extends Container {
 
     const userAgent = window.navigator.userAgent.toLowerCase();
     this.isMobile = /iphone|ipad|android/.test(userAgent);
+    const appVersion = window.navigator.appVersion.toLowerCase();
+    this.isOldIos = /iphone 12/.test(appVersion);
+    console.log(`isOldios = ${this.isOldIos}`);
 
     const currentUserElem = document.getElementById('growi-current-user');
     if (currentUserElem != null) {