WaniKani / Android-Notification

Android Notifier for WaniKani
GNU General Public License v3.0
34 stars 8 forks source link

Custom JavaScript #18

Open Pyxzure opened 10 years ago

Pyxzure commented 10 years ago

Is it possible a custom JavaScript could be injected?

s84606 commented 10 years ago

This is a very interesting proposal. I think it's feasable but you won't be able to e.g. download a script directly from userscript.org, since there is no greasemonkey engine in WKN. I tried integrating it with an existing one, but I did not like the results much. The problem is that scripts are written for PCs (large screens and an hw keyboard) and almost always need some small but crucial customizations to make them work well on a phone or a tablet. Some other scripts are simply too complex to be integrated (I'm currently struggling with WK Improve 2.x, and it is a very difficult task). So the answer is: I can add this feature, buy they must be WK Mobile-specific scripts. Is this what you had in mind?

Pyxzure commented 10 years ago

Yes, sorry if the proposal was too short. A javascript port shouldn't be too hard since most of the script stays the same, only some platform specific changes need to be implemented So someone could use a script he wanted on WK Mobile without having to hard code it into the app itself

s84606 commented 10 years ago

Makes total sense to me. I'll have to provide a JS API too, I guess (e.g. hide/show the keyboard, display dialogs etc.).