|
|
@ -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 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|