Quellcode durchsuchen

Move IsSafari() from AsyncLoop to Tools

Nicholas Barlow vor 5 Jahren
Ursprung
Commit
46bc98e95a
1 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen
  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