Fossil SCM

fix usage of variable before declaration, this only works because browsers add some things automatic to the namespace (which might not work outside quirks mode)

jkosche 2025-05-10 19:28 quickfilter
Commit 6206191a031e755d5ecf535d6441d60e1e5b1bc65d225b4d14c7e28faecbeba2
1 file changed +1 -1
--- src/quickfilter.js
+++ src/quickfilter.js
@@ -7,12 +7,12 @@
77
** filtered (to avoid filtering the header).
88
**
99
** The user can type to filter the table for elements matching the typed text.
1010
*/
1111
12
+const quickfilter = document.getElementById('quickfilter');
1213
quickfilter.addEventListener('input', function(){
13
- const quickfilter = document.getElementById('quickfilter');
1414
const filterrows = document.querySelectorAll('.filterable tbody tr');
1515
const filter = quickfilter.value.toLowerCase().trim();
1616
for(row of filterrows){
1717
const orig = row.innerHTML;
1818
const cleaned = orig.replaceAll("<mark>", "").replaceAll("</mark>", "");
1919
--- src/quickfilter.js
+++ src/quickfilter.js
@@ -7,12 +7,12 @@
7 ** filtered (to avoid filtering the header).
8 **
9 ** The user can type to filter the table for elements matching the typed text.
10 */
11
 
12 quickfilter.addEventListener('input', function(){
13 const quickfilter = document.getElementById('quickfilter');
14 const filterrows = document.querySelectorAll('.filterable tbody tr');
15 const filter = quickfilter.value.toLowerCase().trim();
16 for(row of filterrows){
17 const orig = row.innerHTML;
18 const cleaned = orig.replaceAll("<mark>", "").replaceAll("</mark>", "");
19
--- src/quickfilter.js
+++ src/quickfilter.js
@@ -7,12 +7,12 @@
7 ** filtered (to avoid filtering the header).
8 **
9 ** The user can type to filter the table for elements matching the typed text.
10 */
11
12 const quickfilter = document.getElementById('quickfilter');
13 quickfilter.addEventListener('input', function(){
 
14 const filterrows = document.querySelectorAll('.filterable tbody tr');
15 const filter = quickfilter.value.toLowerCase().trim();
16 for(row of filterrows){
17 const orig = row.innerHTML;
18 const cleaned = orig.replaceAll("<mark>", "").replaceAll("</mark>", "");
19

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button