diff --git a/README.md b/README.md index ac01e9389..1c7bf34df 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) ## 阅读3.0 -书源规则 https://celeter.github.io/?tdsourcetag=s_pctim_aiomsg +书源规则 https://celeter.github.io ## 免责声明 https://gedoor.github.io/MyBookshelf/disclaimer.html diff --git a/app/src/main/assets/web/index.html b/app/src/main/assets/web/index.html index ea5a70c4c..29bebabe2 100644 --- a/app/src/main/assets/web/index.html +++ b/app/src/main/assets/web/index.html @@ -337,6 +337,7 @@
+
diff --git a/app/src/main/assets/web/index.js b/app/src/main/assets/web/index.js index 815d2e7dd..fb2298bbd 100644 --- a/app/src/main/assets/web/index.js +++ b/app/src/main/assets/web/index.js @@ -388,6 +388,26 @@ $('#DebugKey').addEventListener('keydown', e => { $('#debug').dispatchEvent(clickEvent); } }); +$('#Filter').addEventListener('keydown', e => { + if (e.keyCode == 13) { + let cashList = []; + $('#RuleList').innerHTML = ""; + let sKey = Filter.value ? Filter.value : ''; + if (sKey == '') { + cashList = RuleSources; + } else { + let patt = new RegExp(sKey); + RuleSources.forEach(source => { + if (patt.test(source.bookSourceUrl) || patt.test(source.bookSourceName) || patt.test(source.bookSourceGroup)) { + cashList.push(source); + } + }) + } + cashList.forEach(source => { + $('#RuleList').innerHTML += newRule(source); + }) + } +}); // 列表规则更改事件 $('#RuleList').addEventListener('click', e => {