Vanessa 2024-09-25 22:53:47 +08:00
parent a28f0e7b5c
commit 76c9243ff8

View file

@ -6,17 +6,8 @@ export const openByMobile = (uri: string) => {
if (!uri) {
return;
}
if (window.siyuan.config.system.container === "ios") {
if (uri.startsWith("assets/")) {
window.location.href = uri;
} else {
try {
new URL(uri);
window.location.href = uri;
} catch (e) {
window.location.href = "https://" + uri;
}
}
if (isInIOS()) {
window.webkit.messageHandlers.openLink.postMessage(uri);
} else if (isInAndroid()) {
window.JSAndroid.openExternal(uri);
} else {