aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar keis <keijser@gmail.com>2011-05-14 18:28:10 +0200
committerGravatar keis <keijser@gmail.com>2011-05-14 19:06:38 +0200
commitc71e5dd642981b7fdf2d644b19e73caf0840adae (patch)
treebd61bdb4d03ac7853c597adf5cfd7aceb8d444a6 /examples
parentb6b5e6a7cbd114b11974c1b29d6075ab6993a49f (diff)
check input field type using type property
this field is set even when no type attribute is set on the element
Diffstat (limited to 'examples')
-rw-r--r--examples/data/scripts/follow.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js
index 2d65489..ced13aa 100644
--- a/examples/data/scripts/follow.js
+++ b/examples/data/scripts/follow.js
@@ -138,8 +138,8 @@ uzbl.follow.clickElem = function(item) {
var name = item.tagName;
if (name == 'INPUT') {
- var type = item.getAttribute('type').toUpperCase();
- if (type == 'TEXT' || type == 'FILE' || type == 'PASSWORD') {
+ var type = item.type;
+ if (type == 'text' || type == 'file' || type == 'password') {
item.focus();
item.select();
return "XXXEMIT_FORM_ACTIVEXXX";