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:
Uncaught ReferenceError: unsafeWindow is not defined
at <anonymous>:1:16
at <anonymous>:1:405
I did see it's declared in
|
private static final String JSUNSAFEWINDOW = "var unsafeWindow = (function() { var el = document.createElement('p'); el.setAttribute('onclick', 'return window;'); return el.onclick(); }()); window.wrappedJSObject = unsafeWindow;\n"; |
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.
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.