From 4503386b01c9560844df2d8d3507614c77066c43 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 18 Jul 2011 10:46:57 -0600 Subject: handle html5 input types in the formfiller --- examples/data/scripts/formfiller.js | 35 ++++++++++++++++++++++++----------- examples/data/scripts/formfiller.sh | 11 ++++++----- 2 files changed, 30 insertions(+), 16 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/formfiller.js b/examples/data/scripts/formfiller.js index abf0162..a5fc9ee 100644 --- a/examples/data/scripts/formfiller.js +++ b/examples/data/scripts/formfiller.js @@ -1,24 +1,37 @@ uzbl.formfiller = { + inputTypeIsText: function(type) { + var types = [ '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; + } + + , + dump: function() { var rv = ''; var allFrames = new Array(window); - for ( f=0; f