|
@@ -9,7 +9,6 @@ import android.widget.Toast
|
|
import androidx.core.content.ContextCompat
|
|
import androidx.core.content.ContextCompat
|
|
import eu.kanade.tachiyomi.R
|
|
import eu.kanade.tachiyomi.R
|
|
import eu.kanade.tachiyomi.network.NetworkHelper
|
|
import eu.kanade.tachiyomi.network.NetworkHelper
|
|
-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.DeviceUtil
|
|
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
|
import eu.kanade.tachiyomi.util.system.WebViewClientCompat
|
|
import eu.kanade.tachiyomi.util.system.WebViewClientCompat
|
|
@@ -109,7 +108,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")
|
|
- ?: HttpSource.DEFAULT_USER_AGENT
|
|
|
|
|
|
+ ?: networkHelper.defaultUserAgent
|
|
|
|
|
|
webview.webViewClient = object : WebViewClientCompat() {
|
|
webview.webViewClient = object : WebViewClientCompat() {
|
|
override fun onPageFinished(view: WebView, url: String) {
|
|
override fun onPageFinished(view: WebView, url: String) {
|