From 1645330c8d4f6a13b8bcace4201ea82361fabe58 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 8 Dec 2010 01:01:57 +0100 Subject: [PATCH] browser: disable column search if no queryselector Fixes normal queries for older browsers (firefox 2.0 tested ok). --- searchlocal.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/searchlocal.js b/searchlocal.js index eb4baf6..512f07b 100644 --- a/searchlocal.js +++ b/searchlocal.js @@ -69,6 +69,7 @@ function filtertable(query, action) { query = match[2]; } +if (document.querySelector !== undefined) { if (query == '' && action == 'add') { // restore all columns if explicitly adding all ("+") filtercols(table, function(){return true}, 'add'); @@ -82,6 +83,7 @@ function filtertable(query, action) { } return filtercols(table, match, action || 'toggle'); } +} if (/^[A-Z0-9 ]{2,}$/.test(query)) { // category title if all uppercase -- 2.30.0