mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: handleWebview
Closes #194 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user