From 992f0c6240c39846dbf5372b68e28fac4c06bdc2 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sun, 23 Oct 2022 12:42:22 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=AF=E6=8C=81=E5=A4=96=E8=B7=B3?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 7ff2453..33d8380 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -126,6 +126,11 @@ fn main() -> wry::Result<()> { } }) + const pakeLinks = document.links; + for (let linkIndex = 0; linkIndex < pakeLinks.length; linkIndex++) { + pakeLinks[linkIndex].target = '_self'; + } + }); })(); "#; @@ -155,7 +160,7 @@ fn main() -> wry::Result<()> { }; let _webview = WebViewBuilder::new(window)? - .with_url("https://weread.qq.com/")? + .with_url("https://hoppscotch.io/")? // .with_devtools(true) .with_initialization_script(script) .with_ipc_handler(handler)