-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working for some userscripts #12
Comments
Are you using The userscript that you linked to..
In any case, I can't possibly support every random userscript found in the wild. |
Yes, I checked the console log by using Chrome debugger tool on my Mac machine, while running WebMonkey in Android Studio. Thanks for the information! I'll look further to see if I could find the root cause. By the way, here's more information for your reference:
WebView GM library is all I could find on github, and your repo is one of the few repos that tries to enhance it. I'll look further when I have time. If I found anything close to the root cause, and it's something WebMonkey could be modified, I will let you know too. |
it's serendipitous that you mentioned XBrowser.. I'll also give this particular userscript a look.. |
@warren-bank In fact, several weeks ago, xBrowser still couldn't load the script correctly either. It had similar behavior as WebMonkey too: seeing the pink "immersive translate" button on right side of the screen; when clicking translate, all text will be attached a loading cursor, but translation result never being shown. And... one day, the script works on xBrowser! I thought he might reference some open source too. That's why I started searching for similar Open Source solution for Android WebView, because xBrowser proved it's possible on generic WebView too (not other heavy-size chromium clones). |
quick update..
I can confirm that early tests prove that:
so.. to summarize:
hopefully..
|
Wow, thanks for the thorough update. It looks like a lot of effort to make it work. |
actually.. I was wrong about Google requiring CSP to be disabled for userscripts to run on their domain. I don't actually know why it made a difference in my earlier testing.. well.. at the moment, I'm not sure why the translations aren't being displayed.. ..it's actually very possible that it's simply that my WebView needs to be updated; |
PS.. regarding XBrowser.. |
update..
now..
|
one more comment..
update: |
observations..
more observations:
|
debugging..
|
I released a new major version.
long story short.. your userscript runs perfectly in v2.0.1. I appreciate your asking me to look into this. I never took a very close look at the API implementations provided by the upstream WebView GM library.. |
Thank you for your great work and contribution to try to make the script work!!! |
Hi, @warren-bank
I installed userscript (https://greasyfork.org/en/scripts/457196-immersive-translate/code), and trying to make it work.
In the Chrome debug console, it will complain:
I did see it's declared in
Android-WebMonkey/android-studio-project/libs/webview-gm-lib/src/main/java/at/pardus/android/webview/gm/run/WebViewClientGm.java
Line 42 in 76a7901
Due to my lack knowledge of javascript, I am not sure whether it's because some GM APIs are missing, so it can't work properly. Could you help to look at the script, and give me some hint where this might go wrong?
Thank you.
The text was updated successfully, but these errors were encountered: