pull/1705/head
kunfei 3 years ago
parent 92be241a49
commit d52ea2be60
  1. 12
      app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt

@ -54,12 +54,12 @@ class WebViewLoginFragment : BaseFragment(R.layout.fragment_web_view_login) {
@SuppressLint("SetJavaScriptEnabled") @SuppressLint("SetJavaScriptEnabled")
private fun initWebView(source: BaseSource) { private fun initWebView(source: BaseSource) {
val settings = binding.webView.settings binding.webView.settings.apply {
settings.setSupportZoom(true) builtInZoomControls = true
settings.builtInZoomControls = true javaScriptEnabled = true
settings.javaScriptEnabled = true source.getHeaderMap()[AppConst.UA_NAME]?.let {
source.getHeaderMap()[AppConst.UA_NAME]?.let { userAgentString = it
settings.userAgentString = it }
} }
val cookieManager = CookieManager.getInstance() val cookieManager = CookieManager.getInstance()
source.loginUrl?.let { source.loginUrl?.let {

Loading…
Cancel
Save