pull/373/head
gedoor 4 years ago
parent e76a96b5ac
commit 69401f70cb
  1. 5
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt

@ -589,17 +589,12 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions {
* 执行JS
*/
private fun evalJS(jsStr: String, result: Any?): Any? {
try {
val bindings = SimpleBindings()
bindings["java"] = this
bindings["book"] = book
bindings["result"] = result
bindings["baseUrl"] = baseUrl
return SCRIPT_ENGINE.eval(jsStr, bindings)
} catch (e: Exception) {
e.printStackTrace()
throw e
}
}
/**

Loading…
Cancel
Save