Last active
July 24, 2021 15:01
-
-
Save piotrmadry/38dd526499cd927a5183e9ed60ec8cf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun injectJS() { | |
try { | |
val inputStream = assets.open("style.js") | |
inputStream.bufferedReader().use(BufferedReader::readText) | |
} catch (e: Exception) { | |
null | |
}?.let { webView.loadUrl("javascript:($it)()") } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment