pull/32/head
kunfei 5 years ago
parent 7fee8d0952
commit d359571c6c
  1. 3
      app/src/main/java/io/legado/app/constant/AppConst.kt
  2. 4
      app/src/main/java/io/legado/app/constant/Pattern.kt

@ -2,6 +2,7 @@ package io.legado.app.constant
import io.legado.app.App
import io.legado.app.R
import javax.script.ScriptEngine
import javax.script.ScriptEngineManager
object AppConst {
@ -14,7 +15,7 @@ object AppConst {
const val userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.2357.134 Safari/537.36"
val SCRIPT_ENGINE = ScriptEngineManager().getEngineByName("rhino")
val SCRIPT_ENGINE: ScriptEngine = ScriptEngineManager().getEngineByName("rhino")
val NOT_AVAILABLE = App.INSTANCE.getString(R.string.not_available)

@ -3,6 +3,6 @@ package io.legado.app.constant
import java.util.regex.Pattern
object Pattern {
val JS_PATTERN = Pattern.compile("(<js>[\\w\\W]*?</js>|@js:[\\w\\W]*$)", Pattern.CASE_INSENSITIVE)
val EXP_PATTERN = Pattern.compile("\\{\\{([\\w\\W]*?)\\}\\}")
val JS_PATTERN: Pattern = Pattern.compile("(<js>[\\w\\W]*?</js>|@js:[\\w\\W]*$)", Pattern.CASE_INSENSITIVE)
val EXP_PATTERN: Pattern = Pattern.compile("\\{\\{([\\w\\W]*?)\\}\\}")
}
Loading…
Cancel
Save