Merge pull request #352 from Celeter/master

add js method
pull/354/head
kunfei 4 years ago committed by GitHub
commit 632f48e906
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      app/src/main/java/io/legado/app/help/JsExtensions.kt

@ -27,6 +27,17 @@ interface JsExtensions {
} }
} }
fun connect(urlStr: String): Any {
return try {
val analyzeUrl = AnalyzeUrl(urlStr, null, null, null, null, null)
val call = analyzeUrl.getResponse(urlStr)
val response = call.execute()
response
} catch (e: Exception) {
e.localizedMessage
}
}
/** /**
* js实现解码,不能删 * js实现解码,不能删
*/ */

Loading…
Cancel
Save