mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
types: added checkBrowser return type
This commit is contained in:
parent
6c2d46968a
commit
5e7f2c6025
@ -52,7 +52,7 @@ export function supportsWebP() {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
export function checkBrowser() {
|
export function checkBrowser(): string {
|
||||||
const ua = navigator.userAgent
|
const ua = navigator.userAgent
|
||||||
let tem
|
let tem
|
||||||
let M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+(\.\d+)?(\.\d+)?)/i) || []
|
let M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+(\.\d+)?(\.\d+)?)/i) || []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user