🐛 完成对1.2.0的兼容

This commit is contained in:
Tw93
2022-11-24 21:12:51 +08:00
parent c3be3c1d71
commit 2f9ee31b45
3 changed files with 12 additions and 7 deletions

View File

@@ -156,7 +156,12 @@ fn main() -> wry::Result<()> {
}
};
// 用于欺骗有些页面对于浏览器的检测
let user_agent_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36";
let webview = WebViewBuilder::new(window)?
.with_user_agent(&user_agent_string)
.with_accept_first_mouse(true)
.with_url(&url.to_string())?
.with_devtools(cfg!(feature = "devtools"))
.with_initialization_script(include_str!("pake.js"))