From 0fcd55755e5520a607dfd6c77b0a968df036afe2 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Wed, 5 Feb 2025 13:30:36 +0800 Subject: [PATCH] mod: handleWebview Closes #194 Signed-off-by: bggRGjQaUbCoE --- lib/utils/utils.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index ebc2d9fa..8461627d 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -373,7 +373,15 @@ class Utils { bool inApp = false, }) { if (inApp.not && GStorage.openInBrowser) { - launchURL(url); + if (RegExp(r'^(https?://)?((www|m).)?(bilibili|bv23).com') + .hasMatch(url)) { + toDupNamed( + '/webview', + parameters: {'url': url}, + ); + } else { + launchURL(url); + } } else { if (off) { Get.offNamed(