mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: override note title
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -282,11 +282,12 @@ class _WebviewPageNewState extends State<WebviewPageNew> {
|
||||
: null,
|
||||
shouldInterceptAjaxRequest: (controller, ajaxRequest) async {
|
||||
String url = ajaxRequest.url.toString();
|
||||
if (url.startsWith('//api.bilibili.com/x/note/add')) {
|
||||
if (url.startsWith('//api.bilibili.com/x/note/add') &&
|
||||
widget.title != null) {
|
||||
return ajaxRequest
|
||||
..data = ajaxRequest.data
|
||||
.toString()
|
||||
.replaceFirst('title=--', 'title=${widget.title}');
|
||||
.replaceFirst('&title=--&', '&title=${widget.title}&');
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user