pull/34/head
kunfei 5 years ago
parent 950395ca74
commit 025581bd87
  1. 48
      app/src/main/java/io/legado/app/constant/AppConst.kt

@ -9,50 +9,32 @@ import javax.script.ScriptEngineManager
@SuppressLint("SimpleDateFormat") @SuppressLint("SimpleDateFormat")
object AppConst { object AppConst {
const val APP_TAG = "Legado"
const val channelIdDownload = "channel_download" const val channelIdDownload = "channel_download"
const val channelIdReadAloud = "channel_read_aloud" const val channelIdReadAloud = "channel_read_aloud"
const val channelIdWeb = "channel_web" const val channelIdWeb = "channel_web"
const val APP_TAG = "Legado" val NOT_AVAILABLE = App.INSTANCE.getString(R.string.not_available)
const val RC_IMPORT_YUEDU_DATA = 100
const val userAgent = val userAgent: String by lazy {
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36"
}
val SCRIPT_ENGINE: ScriptEngine = ScriptEngineManager().getEngineByName("rhino") val SCRIPT_ENGINE: ScriptEngine by lazy {
ScriptEngineManager().getEngineByName("rhino")
val NOT_AVAILABLE = App.INSTANCE.getString(R.string.not_available) }
val TIME_FORMAT: SimpleDateFormat by lazy { val TIME_FORMAT: SimpleDateFormat by lazy {
SimpleDateFormat("HH:mm") SimpleDateFormat("HH:mm")
} }
val keyboardToolChars = arrayListOf( val keyboardToolChars: List<String> by lazy {
"@", arrayListOf(
"&", "@", "&", "|", "%", "/", ":", "[", "]", "{", "}", "<", ">",
"|", "\\", "$", "#", "!", ".", "href", "src", "textNodes", "xpath",
"%", "json", "css", "id", "class", "tag"
"/",
":",
"[",
"]",
"{",
"}",
"<",
">",
"\\",
"$",
"#",
"!",
".",
"href",
"src",
"textNodes",
"xpath",
"json",
"css",
"id",
"class",
"tag"
) )
} }
}
Loading…
Cancel
Save