mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
44845d34cc
commit
1f76fd156f
@ -9,6 +9,7 @@ import android.webkit.WebSettings
|
||||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
import io.legado.app.constant.AppConst
|
||||
import io.legado.app.help.config.AppConfig
|
||||
import io.legado.app.model.NoStackTraceException
|
||||
import io.legado.app.utils.runOnUI
|
||||
import kotlinx.coroutines.Runnable
|
||||
@ -94,7 +95,7 @@ class BackstageWebView(
|
||||
settings.javaScriptEnabled = true
|
||||
settings.domStorageEnabled = true
|
||||
settings.blockNetworkImage = true
|
||||
settings.userAgentString = headerMap?.get(AppConst.UA_NAME)
|
||||
settings.userAgentString = headerMap?.get(AppConst.UA_NAME) ?: AppConfig.userAgent
|
||||
settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
|
||||
if (sourceRegex.isNullOrEmpty()) {
|
||||
webView.webViewClient = HtmlWebViewClient()
|
||||
|
Loading…
Reference in New Issue
Block a user