From 91da964076912a556a68a38b0f095f2f747ada25 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Sun, 17 Jul 2011 11:19:41 +0000 Subject: fix dmenu prompt in formfiller.sh util/dmenu.sh breaks with spaces in $DMENU_PROMPT. a proper fix looks like it will require all scripts that use util/dmenu.sh to use "eval $DMENU" instead of "$DMENU" (which has side-effects of its own), I'd rather avoid that for now. --- examples/data/scripts/formfiller.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples/data/scripts/formfiller.sh') diff --git a/examples/data/scripts/formfiller.sh b/examples/data/scripts/formfiller.sh index c1171a0..beab011 100755 --- a/examples/data/scripts/formfiller.sh +++ b/examples/data/scripts/formfiller.sh @@ -39,7 +39,10 @@ GenForm () GetOption () { DMENU_SCHEME=formfiller - DMENU_PROMPT="choose profile" + + # util/dmenu.sh doesn't handle spaces in DMENU_PROMPT. a proper fix will be + # tricky. + DMENU_PROMPT="choose_profile" DMENU_LINES=4 . "$UZBL_UTIL_DIR/dmenu.sh" -- cgit v1.2.3 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/data/scripts/formfiller.sh') 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