Ver código fonte

Move IsSafari() from AsyncLoop to Tools

Nicholas Barlow 5 anos atrás
pai
commit
46bc98e95a
1 arquivos alterados com 8 adições e 8 exclusões
  1. 8 8
      src/Misc/tools.ts

+ 8 - 8
src/Misc/tools.ts

@@ -1098,6 +1098,14 @@ export class Tools {
             }, delay);
         });
     }
+
+    /**
+     * Utility function to detect if the current user agent is Safari
+     * @returns whether or not the current user agent is safari
+     */
+    public static IsSafari() : boolean {
+        return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
+    }
 }
 
 /**
@@ -1215,14 +1223,6 @@ export class AsyncLoop {
             }
         }, callback);
     }
-
-    /**
-     * Utility function to detect if the current user agent is Safari
-     * @returns whether or not the current user agent is safari
-     */
-    public static IsSafari() : boolean {
-        return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
-    }
 }
 
 // Will only be define if Tools is imported freeing up some space when only engine is required