|
@@ -9,6 +9,7 @@ import android.webkit.WebSettings
|
|
import android.webkit.WebView
|
|
import android.webkit.WebView
|
|
import android.widget.Toast
|
|
import android.widget.Toast
|
|
import eu.kanade.tachiyomi.R
|
|
import eu.kanade.tachiyomi.R
|
|
|
|
+import eu.kanade.tachiyomi.source.online.HttpSource
|
|
import eu.kanade.tachiyomi.util.lang.launchUI
|
|
import eu.kanade.tachiyomi.util.lang.launchUI
|
|
import eu.kanade.tachiyomi.util.system.WebViewClientCompat
|
|
import eu.kanade.tachiyomi.util.system.WebViewClientCompat
|
|
import eu.kanade.tachiyomi.util.system.WebViewUtil
|
|
import eu.kanade.tachiyomi.util.system.WebViewUtil
|
|
@@ -98,7 +99,7 @@ class CloudflareInterceptor(private val context: Context) : Interceptor {
|
|
|
|
|
|
// Avoid sending empty User-Agent, Chromium WebView will reset to default if empty
|
|
// Avoid sending empty User-Agent, Chromium WebView will reset to default if empty
|
|
webview.settings.userAgentString = request.header("User-Agent")
|
|
webview.settings.userAgentString = request.header("User-Agent")
|
|
- ?: WebViewUtil.DEFAULT_USER_AGENT
|
|
|
|
|
|
+ ?: HttpSource.DEFAULT_USER_AGENT
|
|
|
|
|
|
webview.webViewClient = object : WebViewClientCompat() {
|
|
webview.webViewClient = object : WebViewClientCompat() {
|
|
override fun onPageFinished(view: WebView, url: String) {
|
|
override fun onPageFinished(view: WebView, url: String) {
|