pull/1395/head
gedoor 3 years ago
parent 5854b0af5f
commit 3ff4c38c17
  1. 4
      app/src/main/assets/web/rssSource/index.js

@ -38,7 +38,7 @@ function showTab(tabName) {
} }
// 源列表列表标签构造函数 // 源列表列表标签构造函数
function newRule(rule) { function newRule(rule) {
return `<label for="${rule.sourceUrl}"><input type="radio" name="rule" id="${rule.sourceUrl}"><div>${rule.sourceName}<br>${rule.sourceUrl}</div></label>`; return `<label for="${rule.sourceUrl}"><input type="radio" name="rule" id="${hex_md5(rule.sourceUrl)}"><div>${rule.sourceName}<br>${rule.sourceUrl}</div></label>`;
} }
// 缓存规则列表 // 缓存规则列表
var RuleSources = []; var RuleSources = [];
@ -350,7 +350,7 @@ $('#RuleList').addEventListener('click', e => {
let editRule = null; let editRule = null;
if (e.target && e.target.getAttribute('name') == 'rule') { if (e.target && e.target.getAttribute('name') == 'rule') {
editRule = rule2json(); editRule = rule2json();
json2rule(RuleSources.find(x => x.sourceUrl == e.target.id)); json2rule(RuleSources.find(x => hex_md5(x.sourceUrl) == e.target.id));
} else return; } else return;
if (editRule.sourceUrl == '') return; if (editRule.sourceUrl == '') return;
if (editRule.sourceName == '') editRule.sourceName = editRule.sourceUrl.replace(/.*?\/\/|\/.*/g, ''); if (editRule.sourceName == '') editRule.sourceName = editRule.sourceUrl.replace(/.*?\/\/|\/.*/g, '');

Loading…
Cancel
Save