This commit is contained in:
gilsek 2026-07-26 00:34:34 -07:00 committed by GitHub
commit 4d40407489
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -365,9 +365,10 @@ class MProviderBridged {
.then((res) { .then((res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
final data = jsonDecode(res.body) as Map<String, dynamic>; final data = jsonDecode(res.body) as Map<String, dynamic>;
return data['result'] as bool; // Preserve payloads returned by extension WebView scripts.
return data['result'];
} }
return false; return null;
}), }),
); );
interpreter.registertopLevelFunction('print', ( interpreter.registertopLevelFunction('print', (

View file

@ -70,9 +70,11 @@ class JsUtils {
.then((res) { .then((res) {
if (res.statusCode == 200) { if (res.statusCode == 200) {
final data = jsonDecode(res.body) as Map<String, dynamic>; final data = jsonDecode(res.body) as Map<String, dynamic>;
return data['result'] as bool; // Extension scripts use this bridge to return extracted values,
// not only Cloudflare challenge status.
return data['result'];
} }
return false; return null;
}); });
}); });
runtime.onMessage('parseEpub', (dynamic args) async { runtime.onMessage('parseEpub', (dynamic args) async {