From dbf64a36e2af5b99aa14492757458cc0b260deea Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Thu, 9 Feb 2023 22:56:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/browser/WebViewActivity.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt index cc57653fb..4cdbe8cb2 100644 --- a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt +++ b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt @@ -132,6 +132,7 @@ class WebViewActivity : VMBaseActivity() { viewModel.saveImage(webPic, path) } } + private fun selectSaveFolder() { val default = arrayListOf>() val path = ACache.get().getAsString(imagePathKey) @@ -229,11 +230,10 @@ class WebViewActivity : VMBaseActivity() { } else { binding.titleBar.title = intent.getStringExtra("title") } - if (title == "Just a moment...") { - isCloudflareChallenge = true - } - if (isCloudflareChallenge && title != "Just a moment...") { - if (viewModel.sourceVerificationEnable) { + view.evaluateJavascript("!!window._cf_chl_opt") { + if (it == "true") { + isCloudflareChallenge = true + } else if (isCloudflareChallenge && viewModel.sourceVerificationEnable) { viewModel.saveVerificationResult(intent) { finish() }