From 12c53dc5d02069b1deb330851b4453cc03e05343 Mon Sep 17 00:00:00 2001 From: Celeter Date: Fri, 6 Mar 2020 18:57:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?web=E5=86=99=E6=BA=90=E5=8A=A0=E7=AD=9B?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/web/index.html | 1 + app/src/main/assets/web/index.js | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) 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 => { From 68626921fc51b258a5187332e3bffdd7a73ec652 Mon Sep 17 00:00:00 2001 From: Celeter <48249130+Celeter@users.noreply.github.com> Date: Fri, 6 Mar 2020 20:50:11 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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