mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
10 lines
294 B
TypeScript
10 lines
294 B
TypeScript
import { Utils } from '@nativescript/core'
|
|
declare const global: any
|
|
|
|
export function openUrlOnPhone(url: string): boolean {
|
|
if (!/^https?:\/\//i.test(url)) return false
|
|
if (NSThread.isMainThread) void Utils.openUrl(url)
|
|
else global.postMessage({ type: 'open-url', url })
|
|
return true
|
|
}
|