mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
2cb23a2ef4
commit
ec90372fac
@ -107,7 +107,7 @@
|
|||||||
placeholder="是否加载url (启用: true 关闭: false (可选,默认true))"></textarea>
|
placeholder="是否加载url (启用: true 关闭: false (可选,默认true))"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>启用JS :</div>
|
<div>启用JS :</div>
|
||||||
<textarea rows="1" id="enableJs" class="base" title="enableJs"
|
<textarea rows="1" id="enableJs" class="base" title="enableJs"
|
||||||
placeholder="是否启用Js (启用: true 关闭: false (可选,默认true))"></textarea>
|
placeholder="是否启用Js (启用: true 关闭: false (可选,默认true))"></textarea>
|
||||||
</div>
|
</div>
|
||||||
@ -148,6 +148,11 @@
|
|||||||
<textarea rows="1" id="customOrder" class="base" title="customOrder"
|
<textarea rows="1" id="customOrder" class="base" title="customOrder"
|
||||||
placeholder="整数: 0~N (可选,默认0) | 数字越小越靠前"></textarea>
|
placeholder="整数: 0~N (可选,默认0) | 数字越小越靠前"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>单URL :</div>
|
||||||
|
<textarea rows="1" id="singleUrl" class="base" title="singleUrl"
|
||||||
|
placeholder="启用: true 关闭: false (可选,false)"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
|
@ -76,14 +76,15 @@ function rule2json() {
|
|||||||
let RuleJSON = Container();
|
let RuleJSON = Container();
|
||||||
// 转换base
|
// 转换base
|
||||||
Object.keys(RuleJSON).forEach(key => {
|
Object.keys(RuleJSON).forEach(key => {
|
||||||
if (!key.startsWith("rule")) {
|
|
||||||
RuleJSON[key] = $('#' + key).value;
|
RuleJSON[key] = $('#' + key).value;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
RuleJSON.lastUpdateTime = new Date().getTime();
|
RuleJSON.lastUpdateTime = new Date().getTime();
|
||||||
RuleJSON.customOrder = RuleJSON.customOrder == '' ? 0 : parseInt(RuleJSON.customOrder);
|
RuleJSON.customOrder = RuleJSON.customOrder == '' ? 0 : parseInt(RuleJSON.customOrder);
|
||||||
RuleJSON.enabled = RuleJSON.enabled == '' || String(RuleJSON.enabled).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
RuleJSON.enabled = RuleJSON.enabled == '' || String(RuleJSON.enabled).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
||||||
|
RuleJSON.enableJs = RuleJSON.enableJs == '' || String(RuleJSON.enableJs).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
||||||
|
RuleJSON.loadWithBaseUrl = RuleJSON.loadWithBaseUrl == '' || String(RuleJSON.loadWithBaseUrl).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
||||||
|
RuleJSON.singleUrl = RuleJSON.singleUrl == '' || String(RuleJSON.singleUrl).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true';
|
||||||
return RuleJSON;
|
return RuleJSON;
|
||||||
}
|
}
|
||||||
// 将源对象填充到源表单
|
// 将源对象填充到源表单
|
||||||
|
Loading…
Reference in New Issue
Block a user