Update WebViewActivity.kt (#3617)

This code added is for some extension that blocks tachiyomi, by tricking it that it was sent by a android browser, nothing major changes,
This commit is contained in:
armangido 2020-08-23 00:37:21 +08:00 committed by GitHub
parent 4929e66ecc
commit 3f1355c413
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,9 @@ class WebViewActivity : BaseActivity<WebviewActivityBinding>() {
binding.webview.webViewClient = object : WebViewClientCompat() {
override fun shouldOverrideUrlCompat(view: WebView, url: String): Boolean {
view.loadUrl(url)
val android_browser: MutableMap<String, String> = HashMap()
android_browser["X-Requested-With"] = "com.android.browser"
view.loadUrl(url,android_browser)
return true
}