This commit is contained in:
parent
a28f0e7b5c
commit
76c9243ff8
1 changed files with 2 additions and 11 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue