Adding JavaScript to Android Browser

Is there anything I can do for the Android platform (part of the browser / website) to run my own predefined JavaScript (scripts) along with every webpage viewed by the default Android web browser?

+4
source share
3 answers

Can I do something for the Android platform (part of the browser / webkit) to run my own predefined JavaScript (scripts) along with every webpage viewed by the default Android web browser?

There is no single "standard Android web browser."

I don’t know how to install custom scripts in AOSP browser or in Chrome. There are third-party applications, such as TamperMonkey , which are actually their own web browser and offer custom scripts, while other third-party browsers may have hooks that can be used for the GreaseMonkey equivalent.

+4
source

You can take a look at this site, I found js very useful. DroidScript provides a JavaScript interface between your HTML pages and native Android code, allowing you to use the device’s functionality with the simplest JavaScript commands.

https://github.com/divineprog/droidscript

+2
source

If you are using WebView , you can simply enable javascript with

getSettings().setJavaScriptEnabled(true) 
+1
source

Source: https://habr.com/ru/post/1432711/


All Articles