🐛 完成对1.2.0的兼容
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user