mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-07-26 23:32:20 +00:00
Merge d4fcbc791e into 0675741d30
This commit is contained in:
commit
4d40407489
2 changed files with 7 additions and 4 deletions
|
|
@ -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', (
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue