优化
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
> `JavaScript Code` 直接填写JavaScript片段
|
> `JavaScript Code` 直接填写JavaScript片段
|
||||||
> `{"example":"https://www.example.com/js/example.js", ...}` 自动复用已经下载的js文件
|
> `{"example":"https://www.example.com/js/example.js", ...}` 自动复用已经下载的js文件
|
||||||
|
|
||||||
|
> 注意此处定义的函数可能会被多个线程同时调用,在函数里的全局变量内容将会共享使用,对其进行修改可能会出现竞争问题
|
||||||
|
|
||||||
* 并发率
|
* 并发率
|
||||||
> 并发限制,单位ms,可填写两种格式
|
> 并发限制,单位ms,可填写两种格式
|
||||||
|
|
||||||
|
|||||||
@@ -70,13 +70,6 @@ object SharedJsScope {
|
|||||||
if (scope is ScriptableObject) {
|
if (scope is ScriptableObject) {
|
||||||
scope.sealObject()
|
scope.sealObject()
|
||||||
}
|
}
|
||||||
if (scope is Map<*, *>) {
|
|
||||||
scope.entries.forEach {
|
|
||||||
if (it is ScriptableObject) {
|
|
||||||
it.sealObject()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scopeMap[key] = WeakReference(scope)
|
scopeMap[key] = WeakReference(scope)
|
||||||
}
|
}
|
||||||
return scope
|
return scope
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class AnalyzeUrl(
|
|||||||
private set
|
private set
|
||||||
var type: String? = null
|
var type: String? = null
|
||||||
private set
|
private set
|
||||||
val headerMap = HashMap<String, String>()
|
val headerMap = LinkedHashMap<String, String>()
|
||||||
private var urlNoQuery: String = ""
|
private var urlNoQuery: String = ""
|
||||||
private var encodedForm: String? = null
|
private var encodedForm: String? = null
|
||||||
private var encodedQuery: String? = null
|
private var encodedQuery: String? = null
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ object BookList {
|
|||||||
baseUrl: String,
|
baseUrl: String,
|
||||||
variable: String?,
|
variable: String?,
|
||||||
log: Boolean,
|
log: Boolean,
|
||||||
filter: ((name: String, author: String) -> Boolean)? = null,
|
filter: ((name: String, author: String) -> Boolean)?,
|
||||||
ruleName: List<AnalyzeRule.SourceRule>,
|
ruleName: List<AnalyzeRule.SourceRule>,
|
||||||
ruleBookUrl: List<AnalyzeRule.SourceRule>,
|
ruleBookUrl: List<AnalyzeRule.SourceRule>,
|
||||||
ruleAuthor: List<AnalyzeRule.SourceRule>,
|
ruleAuthor: List<AnalyzeRule.SourceRule>,
|
||||||
|
|||||||
Reference in New Issue
Block a user