From e7df172da1729c0f9c7344d5c4f8847a830da581 Mon Sep 17 00:00:00 2001 From: inorichi Date: Mon, 8 Apr 2019 10:13:58 +0200 Subject: [PATCH] Provide default web view client so that redirections work --- .../eu/kanade/tachiyomi/ui/manga/info/MangaWebViewController.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaWebViewController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaWebViewController.kt index 15a85a108..36126a9b2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaWebViewController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaWebViewController.kt @@ -5,6 +5,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.webkit.WebView +import android.webkit.WebViewClient import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.online.HttpSource @@ -31,6 +32,7 @@ class MangaWebViewController(bundle: Bundle? = null) : BaseController(bundle) { val headers = source.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" } val web = view as WebView + web.webViewClient = WebViewClient() web.settings.javaScriptEnabled = true web.settings.userAgentString = source.headers["User-Agent"] web.loadUrl(url, headers)