Closed void285 closed 1 month ago
I try replace ttsHost.getWebView().evaluateJavascript
with ttsHost.getWebView().loadUrl
in java/fr/gaulupeau/apps/Poche/tts/WebViewText.java
, even worse, the play button always stucks.
Have you tried using WebView debugging? If I recall correctly, it was quite useful for debugging this functionality.
I think all you have to do is to have your device in the same network and open chrome://inspect
in Chrome (or Chromium).
Thank you! I debug webview and find the problem is caused by "no contains method on undefined", so I have to check if element.classList is undefined first. Obviously, the script/style elements have no classList properties. And it seems webview dont support str.includes method, if run "abc".includes("a");
, it complains undefined is not a function
, namely it thinks "abc".includes
is undefined
.
Issue details
Duplicate?
no
Actual behaviour
In
app/src/main/res/raw/tts_parser.js
, there is a function namedshouldSkip
, when I try editing it to skip pre or code tags, I found if include!==
operator or edit the function in some specific ways, a problem occurs: after tap the play button, the play button stays as...
and the TTS wont work.The original function:
Success conditions:
If include condition like this, the problem occur:
Environment details
Your experience with wallabag Android app
Wonderfull, wallabag is my most used APP.