This commit is contained in:
Horis
2025-02-12 13:06:11 +08:00
parent ea267b2cff
commit d8864eed4a
2 changed files with 5 additions and 5 deletions
@@ -1,9 +1,8 @@
package io.legado.app.help
import android.content.Intent
import android.net.Uri
import android.webkit.WebSettings
import android.app.AlertDialog
import android.content.Intent
import androidx.annotation.Keep
import cn.hutool.core.codec.Base64
import cn.hutool.core.util.HexUtil
@@ -48,11 +47,9 @@ import io.legado.app.utils.readText
import io.legado.app.utils.stackTraceStr
import io.legado.app.utils.toStringArray
import io.legado.app.utils.toastOnUi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import okio.use
import org.jsoup.Connection
import org.jsoup.Jsoup
@@ -963,6 +960,10 @@ interface JsExtensions : JsEncodeUtils {
return AppConst.androidId
}
fun openUrl(url: String) {
openUrl(url, null)
}
// 新增 mimeType 参数,默认为 null(保持兼容性)
fun openUrl(url: String, mimeType: String? = null) {
try {