mod: handle search url

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-27 21:18:29 +08:00
parent 43409826f3
commit 6d7b0e8dd5

View File

@@ -500,6 +500,7 @@ class PiliScheme {
// www.bilibili.com
// space.bilibili.com
// live.bilibili.com
// search.bilibili.com
// redirect
if (host.contains('b23.tv')) {
@@ -544,6 +545,20 @@ class PiliScheme {
return false;
}
if (host.contains('search.bilibili.com')) {
String? keyword = uri.queryParameters['keyword'];
if (keyword != null) {
PageUtils.toDupNamed(
'/searchResult',
parameters: {'keyword': keyword},
off: off,
);
return true;
}
launchURL();
return false;
}
List<String> pathSegments = uri.pathSegments;
if (pathSegments.isEmpty) {
launchURL();