add js method

pull/352/head
Knock 4 years ago
parent 82f8c15f09
commit 870358cf82
  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实现解码,不能删
*/

Loading…
Cancel
Save