From 3f1355c4136843f3d7d85a626370ce1b6fd3f1e0 Mon Sep 17 00:00:00 2001 From: armangido <42208098+armangido@users.noreply.github.com> Date: Sun, 23 Aug 2020 00:37:21 +0800 Subject: [PATCH] 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, --- .../java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index 2eaed5bd6d..ea94582d1d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -100,7 +100,9 @@ class WebViewActivity : BaseActivity() { binding.webview.webViewClient = object : WebViewClientCompat() { override fun shouldOverrideUrlCompat(view: WebView, url: String): Boolean { - view.loadUrl(url) + val android_browser: MutableMap = HashMap() + android_browser["X-Requested-With"] = "com.android.browser" + view.loadUrl(url,android_browser) return true }