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