browser: support filter form without classList
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 7 Dec 2010 04:22:20 +0000 (05:22 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 21:40:44 +0000 (22:40 +0100)
Minor fixes to make it work in Epiphany.

searchlocal.js

index 2993a4a96fa83261ac0833dede4132f3a4fc03cb..f0036a6f8ecb84b9ead49708b464433a65844dba 100644 (file)
@@ -12,6 +12,7 @@ function filtertable(query, action) {
                                break;
                        case 'filter':
                                rows[i].style.display = keep ? '' : 'none';
+                               if (!Element.prototype.hasOwnProperty('classList')) continue;
                                // continue
                        default: // reset
                                rows[i].classList.remove('focus');
@@ -34,7 +35,7 @@ function prependsearch(target) {
        target.parentNode.insertBefore(newelement(
                'form', {
                        id: 'search',
-                       class: 'aside',
+                       'class': 'aside',
                        onsubmit: "filtertable(this.q.value, 'filter'); this.q.value = ''; return false",
                },
                [