From 4bb5c202f366bb1818054ceaa89474545344d554 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 26 Sep 2011 18:28:43 +0000 Subject: fix following input[type=email], [type=search], etc. --- examples/data/scripts/formfiller.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'examples/data/scripts/formfiller.js') diff --git a/examples/data/scripts/formfiller.js b/examples/data/scripts/formfiller.js index 4470661..1b10db4 100644 --- a/examples/data/scripts/formfiller.js +++ b/examples/data/scripts/formfiller.js @@ -1,14 +1,16 @@ uzbl.formfiller = { - inputTypeIsText: function(type) { - var types = [ 'text', 'password', 'search', 'email', 'url', - 'number', 'range', 'color', 'date', 'month', - 'week', 'time', 'datetime', 'datetime-local' ]; + // this is pointlessly duplicated in uzbl.follow + textInputTypes: [ + 'text', 'password', 'search', 'email', 'url', 'number', 'range', 'color', + 'date', 'month', 'week', 'time', 'datetime', 'datetime-local' + ] - for(var i = 0; i < types.length; ++i) - if(types[i] == type) return true; + , - return false; + // this is pointlessly duplicated in uzbl.follow + inputTypeIsText: function(type) { + return uzbl.formfiller.textInputTypes.indexOf(type) >= 0; } , -- cgit v1.2.3