pull/1551/head
gedoor 3 years ago
parent 2cb23a2ef4
commit ec90372fac
  1. 7
      app/src/main/assets/web/rssSource/index.html
  2. 5
      app/src/main/assets/web/rssSource/index.js

@ -107,7 +107,7 @@
placeholder="是否加载url (启用: true 关闭: false (可选,默认true))"></textarea>
</div>
<div>
<div>启用JS :</div>
<div>启用JS :</div>
<textarea rows="1" id="enableJs" class="base" title="enableJs"
placeholder="是否启用Js (启用: true 关闭: false (可选,默认true))"></textarea>
</div>
@ -148,6 +148,11 @@
<textarea rows="1" id="customOrder" class="base" title="customOrder"
placeholder="整数: 0~N (可选,默认0) | 数字越小越靠前"></textarea>
</div>
<div>
<div>单URL :</div>
<textarea rows="1" id="singleUrl" class="base" title="singleUrl"
placeholder="启用: true 关闭: false (可选,false)"></textarea>
</div>
</div>
</div>
<div class="menu">

@ -76,14 +76,15 @@ function rule2json() {
let RuleJSON = Container();
// 转换base
Object.keys(RuleJSON).forEach(key => {
if (!key.startsWith("rule")) {
RuleJSON[key] = $('#' + key).value;
}
});
RuleJSON.lastUpdateTime = new Date().getTime();
RuleJSON.customOrder = RuleJSON.customOrder == '' ? 0 : parseInt(RuleJSON.customOrder);
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;
}
// 将源对象填充到源表单

Loading…
Cancel
Save