pull/37/head
kunfei 5 years ago
parent 401b55883d
commit fc64ceed60
  1. 15
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt

@ -103,11 +103,16 @@ class AnalyzeUrl(
} }
for (rule in ruleList) { for (rule in ruleList) {
var ruleStr = rule var ruleStr = rule
if (ruleStr.startsWith("<js>")) { when {
ruleStr = ruleStr.substring(4, ruleStr.lastIndexOf("<")) ruleStr.startsWith("<js>") -> {
ruleUrl = evalJS(ruleStr, ruleUrl, page, key, book) as String ruleStr = ruleStr.substring(4, ruleStr.lastIndexOf("<"))
} else { ruleUrl = evalJS(ruleStr, ruleUrl, page, key, book) as String
ruleUrl = ruleStr.replace("@result", ruleUrl) }
ruleStr.startsWith("@js", true) -> {
ruleStr = ruleStr.substring(4)
ruleUrl = evalJS(ruleStr, ruleUrl, page, key, book) as String
}
else -> ruleUrl = ruleStr
} }
} }
} }

Loading…
Cancel
Save