瀏覽代碼

Remove Utils.platformString()

customisations
alemart 3 月之前
父節點
當前提交
cf6fd1b504
共有 2 個檔案被更改,包括 1 行新增14 行删除
  1. 1
    1
      src/core/session.ts
  2. 0
    13
      src/utils/utils.ts

+ 1
- 1
src/core/session.ts 查看文件

203
         //alert(Utils.deviceInfo()); // debug
203
         //alert(Utils.deviceInfo()); // debug
204
 
204
 
205
         // If Safari / iOS, require version 15.2 or later
205
         // If Safari / iOS, require version 15.2 or later
206
-        if(/(Mac|iOS|iPhone|iPad|iPod)/i.test(Utils.platformString())) {
206
+        if(/(Mac|iOS|iPhone|iPad|iPod)/i.test(navigator.platform)) {
207
 
207
 
208
             /*
208
             /*
209
 
209
 

+ 0
- 13
src/utils/utils.ts 查看文件

147
     }
147
     }
148
 
148
 
149
     /**
149
     /**
150
-     * Returns a string containing platform brand information
151
-     * @returns platform brand information
152
-     */
153
-    static platformString(): string
154
-    {
155
-        return ((navigator: any): string =>
156
-            typeof navigator.userAgentData === 'object' ? // prefer the NavigatorUAData interface
157
-            navigator.userAgentData.platform : // use only low entropy data
158
-            navigator.platform // navigator.platform is deprecated
159
-        )(navigator);
160
-    }
161
-
162
-    /**
163
      * Checks if we're on iOS
150
      * Checks if we're on iOS
164
      * @returns true if we're on iOS
151
      * @returns true if we're on iOS
165
      */
152
      */

Loading…
取消
儲存