warren-bank / Android-WebMonkey

No-frills light-weight Android web browser with support for Greasemonkey userscripts.
https://warren-bank.github.io/Android-WebMonkey/index.html
GNU General Public License v2.0
105 stars 24 forks source link

(Not an issue but more like a discussion & feature request) #13

Closed minischoolX closed 1 year ago

minischoolX commented 1 year ago

Hi Mr. Bank,

Good day.

I am really happy to see someone putting so much efforts in this direction to enable monkey support for webview.

I have a few questions regarding the same which are listed below.

  1. Is this replica of monkey extention for webview? If so does it mean this is a webview with monkey script enabled? I think answer is yes. If so when do you think this will become fully functional?
  2. I have been trying your web monkey version and I want to point out that user experience isn't good at all (no offense this bases my feature request) so can we simply create a library that's extended webview instead of new webview? For eg library webview extends webkit.webview and adds a method that would provide me with a great alternative or makes migration from webkit to webmonkey easier. For eg. I do have I webview project and i feel I need monkey added I don't need to refractor my whole code I can rather change few import statements from webkit to webmonkey and done. Does it make any sense?
  3. If above method is accepted we could add an entry point for a monkey like webSettings.monkeyEnabled(true) probably we can also define more controls such as do we need a ui? i.e. do user get to add and manage scripts or it's only developer who controls the script and no ui is needed ets?

Right now I have tried using your own YouTube script and i didn't see that work in action though it works on other browser through extensions. Also I was almost convinced by Mozilla and chrome that having extention support for webview is out of question as it requires browser apis which isn't available to webview until I came across your work. I really appreciate it. Thanks for starting this efforts.

Regards,

warren-bank commented 1 year ago
minischoolX commented 1 year ago

Hi I did not intend any offense. I did not have any intentions to hurt your feelings at all. in spite if I did I apologise for it.

See I wrote it because I am interested in getting involved. let me give more clarity if there is any misunderstanding/confusion.

I just tested my [Youtube userscript](https://github.com/warren-bank/crx-Youtube).. from [its download link](https://github.com/warren-bank/crx-Youtube/raw/webmonkey-userscript/es6/webmonkey-userscript/Youtube.user.js) on [this page](https://warren-bank.github.io/Android-WebMonkey/index.html).. and it worked exactly as it's supposed to

Yes, you are correct script works. but does it work within the web monkey app? I downloaded and installed script from your page. it was listed and enabled. I head over to youtube.com and opened a watch page and script did nothing. since you mentioned that it is working I checked what could potentially be wrong for me? there was one flow that I noticed which is while navigating through the youtube in the application its not making any changes to the url or path which led your script not getting triggered. So now that script works I am happy that this works as proof of concept. While it is not your responsibility to ensure that all scripts work I am interested in ensuring some scripts at least works like nova youtube script. So here is what I am asking could it be because nova youtube script uses lot of gm grants? or because of unmatchable meta data inside ==//UserScript// or something else? How would I find out what part of the script is breaking it though it gets initialized? and I would like to get a bigger picture on how your code makes user script work for webview? what to expect what not to expect? how it compares with open source violent monkey.

Thanks