From c7cf3ef494c7e971c7884bb8e5ba93c9c5e9b32d Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 13 Apr 2011 22:15:53 -0400 Subject: Handle returning a uri selected by follow.js --- examples/data/scripts/follow.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index b7b0d82..ad71674 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -222,7 +222,7 @@ uzbl.follow.followLinks = function(follow) { //var desc = '*[title], img[alt], applet[alt], area[alt], input[alt]'; //var image = 'img, input[type=image]'; - if(newwindow) + if(newwindow || returnuri) var res = this.query(uri); else var res = this.query(followable); @@ -237,6 +237,11 @@ uzbl.follow.followLinks = function(follow) { // clear all of our hints this.clearHints(); + if (returnuri) { + var uri = el.src || el.href; + return "XXXRETURNED_URIXXX" + uri + } + if (newwindow) { // we're opening a new window using the URL attached to this element var uri = el.src || el.href; -- cgit v1.2.3 From 0809e47599aeb86b851a3338b71602f69306dfed Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 13 Apr 2011 22:16:34 -0400 Subject: Handle returned uris in the follow.sh wrapper --- examples/data/scripts/follow.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index 014793e..01a4f91 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -1,7 +1,13 @@ #!/bin/sh # This scripts acts on the return value of followLinks in follow.js -case "$1" in +result=$1 +shift + +uriaction=$1 +shift + +case "$result" in XXXEMIT_FORM_ACTIVEXXX) # a form element was selected printf 'event FORM_ACTIVE\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" @@ -10,4 +16,12 @@ case "$1" in # a link was selected, reset uzbl's input mode printf 'set mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" ;; + XXXRETURNED_URIXXX*) + uri=${result#XXXRETURNED_URIXXX} + + case "$uriaction" in + set) + printf 'uri '"$uri"'\nset mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" + ;; + esac esac -- cgit v1.2.3 From 5931675528cd29642987512acbc08142d5699f6a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 13 Apr 2011 22:16:52 -0400 Subject: Add binding for going to the uri of a target Also ports old commands to new structure. --- examples/config/config | 5 +++-- examples/data/scripts/follow.js | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index d049f0e..b8312e5 100644 --- a/examples/config/config +++ b/examples/config/config @@ -343,8 +343,9 @@ set follow_hint_keys = 0123456789 #set follow_hint_keys = qwerty #set follow_hint_keys = asdfghjkl; #set follow_hint_keys = thsnd-rcgmvwb/;789aefijkopquxyz234 -@cbind fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 0) >\@ -@cbind Fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 1) >\@ +@cbind fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'click') >\@ +@cbind Fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'newwindow') >\@ +@cbind fL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ set @cbind fi = spawn @scripts_dir/go_input.sh # Form filler binds diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index ad71674..22175ca 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -16,7 +16,16 @@ uzbldivid = 'uzbl_link_hints'; uzbl.follow = function() { // Export charset = arguments[0]; - newwindow = arguments[2]; + if (arguments[2] == 'click') { + newwindow = false; + returnuri = false; + } else if (arguments[2] == 'newwindow') { + newwindow = true; + returnuri = false; + } else if (arguments[2] == 'returnuri') { + newwindow = false; + returnuri = true; + } var keypress = arguments[1]; return arguments.callee.followLinks(keypress); -- cgit v1.2.3 From 1b171ea59fffa3df92aa4b3b1604c911a77b9c3a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 14 Apr 2011 22:58:05 -0400 Subject: Ignore errors when attaching labels --- examples/data/scripts/follow.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index 22175ca..782b1d1 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -178,9 +178,13 @@ uzbl.follow.reDrawHints = function(elems, chars) { elements.forEach(function(el, i) { var label = labels[i]; var pos = positions[i]; - var doc = uzbl.follow.getDocument(el); - var h = uzbl.follow.generateHint(doc, el, label, pos[0], pos[1]); - doc.hintdiv.appendChild(h); + try { + var doc = uzbl.follow.getDocument(el); + var h = uzbl.follow.generateHint(doc, el, label, pos[0], pos[1]); + doc.hintdiv.appendChild(h); + } catch (err) { + // Unable to attach label -> shrug it off and continue + } }); } -- cgit v1.2.3 From a4ec13b670c5e27483aa388a1ef03a15b8bba935 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 20 Apr 2011 21:29:48 -0400 Subject: Add binding to copy a link to the clipboard --- examples/config/config | 1 + examples/data/scripts/follow.sh | 3 +++ 2 files changed, 4 insertions(+) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index b8312e5..8ed533f 100644 --- a/examples/config/config +++ b/examples/config/config @@ -346,6 +346,7 @@ set follow_hint_keys = 0123456789 @cbind fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'click') >\@ @cbind Fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'newwindow') >\@ @cbind fL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ set +@cbind FL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ clipboard @cbind fi = spawn @scripts_dir/go_input.sh # Form filler binds diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index 01a4f91..262aec3 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -23,5 +23,8 @@ case "$result" in set) printf 'uri '"$uri"'\nset mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" ;; + clipboard) + printf "$uri" | xclip + ;; esac esac -- cgit v1.2.3 From f39423189b7e564656a241c22ff6eb7fc03bd8c9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 20 Apr 2011 21:39:44 -0400 Subject: Factor out the clearing of the labels --- examples/data/scripts/follow.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index 262aec3..f08bd29 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -21,10 +21,11 @@ case "$result" in case "$uriaction" in set) - printf 'uri '"$uri"'\nset mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" + printf 'uri '"$uri"'\n' > "$UZBL_FIFO" ;; clipboard) printf "$uri" | xclip ;; esac + printf 'set mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" esac -- cgit v1.2.3 From 37d3e9056791c97ea057d87bcb256dde9f69f1c5 Mon Sep 17 00:00:00 2001 From: keis Date: Fri, 29 Apr 2011 20:35:49 +0200 Subject: use focus_element instead of form active --- examples/config/config | 2 +- examples/data/scripts/follow.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 8c706df..0336f1d 100644 --- a/examples/config/config +++ b/examples/config/config @@ -83,7 +83,7 @@ set download_handler = sync_spawn @scripts_dir/download.sh @on_event LOAD_FINISH spawn @scripts_dir/history.sh # Switch to insert mode if a (editable) html form is clicked -@on_event FORM_ACTIVE @set_mode insert +@on_event FOCUS_ELEMENT sh 'if [ "$1" == INPUT ]; then echo "@set_mode insert" > $UZBL_FIFO; fi' %s # Switch to command mode if anything else is clicked @on_event ROOT_ACTIVE @set_mode command diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index 014793e..0d0b256 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -4,7 +4,7 @@ case "$1" in XXXEMIT_FORM_ACTIVEXXX) # a form element was selected - printf 'event FORM_ACTIVE\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" + printf 'event KEYCMD_CLEAR\n' > "$UZBL_FIFO" ;; XXXRESET_MODEXXX) # a link was selected, reset uzbl's input mode -- cgit v1.2.3 From b2d8dcb3ea9e7dac3df5fe2eb20619087f31200f Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Sun, 8 May 2011 15:13:44 -0600 Subject: follow.js: maintain compatibility with old configurations --- examples/data/scripts/follow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index 782b1d1..2d65489 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -16,10 +16,10 @@ uzbldivid = 'uzbl_link_hints'; uzbl.follow = function() { // Export charset = arguments[0]; - if (arguments[2] == 'click') { + if (arguments[2] == 0 || arguments[2] == 'click') { newwindow = false; returnuri = false; - } else if (arguments[2] == 'newwindow') { + } else if (arguments[2] == 1 || arguments[2] == 'newwindow') { newwindow = true; returnuri = false; } else if (arguments[2] == 'returnuri') { -- cgit v1.2.3 From c71e5dd642981b7fdf2d644b19e73caf0840adae Mon Sep 17 00:00:00 2001 From: keis Date: Sat, 14 May 2011 18:28:10 +0200 Subject: check input field type using type property this field is set even when no type attribute is set on the element --- examples/data/scripts/follow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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"; -- cgit v1.2.3 From b8ba98602eb01975850f0bf26c9efff0ca82e976 Mon Sep 17 00:00:00 2001 From: keis Date: Sat, 14 May 2011 18:36:24 +0200 Subject: use instanceof to check element type --- examples/data/scripts/follow.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index ced13aa..aa4ed72 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -135,9 +135,8 @@ uzbl.follow.generateHint = function(doc, el, label, top, left) { // but at least set the href of the link. (needs some improvements) uzbl.follow.clickElem = function(item) { if(!item) return; - var name = item.tagName; - if (name == 'INPUT') { + if (item instanceof HTMLInputElement) { var type = item.type; if (type == 'text' || type == 'file' || type == 'password') { item.focus(); @@ -145,7 +144,7 @@ uzbl.follow.clickElem = function(item) { return "XXXEMIT_FORM_ACTIVEXXX"; } // otherwise fall through to a simulated mouseclick. - } else if (name == 'TEXTAREA' || name == 'SELECT') { + } else if (item instanceof HTMLTextAreaElement || item instanceof HTMLSelectElement) { item.focus(); item.select(); return "XXXEMIT_FORM_ACTIVEXXX"; -- cgit v1.2.3 From 6ac403eb4c344db1335574fc40a4a873c469bf8c Mon Sep 17 00:00:00 2001 From: keis Date: Sat, 14 May 2011 19:03:25 +0200 Subject: don't try to call select on select elements --- examples/data/scripts/follow.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index aa4ed72..5ecdcef 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -146,7 +146,8 @@ uzbl.follow.clickElem = function(item) { // otherwise fall through to a simulated mouseclick. } else if (item instanceof HTMLTextAreaElement || item instanceof HTMLSelectElement) { item.focus(); - item.select(); + if(typeof item.select != 'undefined') + item.select(); return "XXXEMIT_FORM_ACTIVEXXX"; } -- cgit v1.2.3 From d8cd0405b206fefecd30ee6c03fe8a4583f2eab2 Mon Sep 17 00:00:00 2001 From: keis Date: Sat, 14 May 2011 19:04:32 +0200 Subject: ins mode on focus_element for textarea/insert --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 9507b95..8ae9cb3 100644 --- a/examples/config/config +++ b/examples/config/config @@ -83,7 +83,7 @@ set download_handler = sync_spawn @scripts_dir/download.sh @on_event LOAD_FINISH spawn @scripts_dir/history.sh # Switch to insert mode if a (editable) html form is clicked -@on_event FOCUS_ELEMENT sh 'if [ "$1" == INPUT ]; then echo "@set_mode insert" > $UZBL_FIFO; fi' %s +@on_event FOCUS_ELEMENT sh 'if [ "$1" = INPUT -o "$1" = TEXTAREA -o "$1" = SELECT ]; then echo "@set_mode insert" > $UZBL_FIFO; fi' %s # Switch to command mode if anything else is clicked @on_event ROOT_ACTIVE @set_mode command -- cgit v1.2.3 From 953478545c6ec966f69d97aee7b8f49c40bd8ca0 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 23 May 2011 15:20:48 +0000 Subject: yU should be able to yank URLs with spaces --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 8ae9cb3..798ac80 100644 --- a/examples/config/config +++ b/examples/config/config @@ -310,7 +310,7 @@ set ebind = @mode_bind global,-insert # Yanking & pasting binds @cbind yu = sh 'echo -n "$UZBL_URI" | xclip' -@cbind yU = sh 'echo -n "$1" | xclip' \@SELECTED_URI +@cbind yU = sh 'echo -n "$1" | xclip' '\@SELECTED_URI' @cbind yy = sh 'echo -n "$UZBL_TITLE" | xclip' # Clone current window -- cgit v1.2.3 From ee9a8f9203a6e241554e9cbbb3edba587e25b76a Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 23 May 2011 15:30:54 +0000 Subject: change bookmark bindings to m and M so they don't clash with scroll bindings --- examples/config/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 798ac80..7c1a8ba 100644 --- a/examples/config/config +++ b/examples/config/config @@ -325,9 +325,9 @@ set ebind = @mode_bind global,-insert @bind = sh 'echo "event INJECT_KEYCMD $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' # Bookmark inserting binds -@cbind b_ = sh 'echo `printf "$UZBL_URI %s"` >> "$XDG_DATA_HOME"/uzbl/bookmarks' +@cbind m_ = sh 'echo `printf "$UZBL_URI %s"` >> "$XDG_DATA_HOME"/uzbl/bookmarks' # Or use a script to insert a bookmark. -@cbind B = spawn @scripts_dir/insert_bookmark.sh +@cbind M = spawn @scripts_dir/insert_bookmark.sh # Bookmark/history loading @cbind U = spawn @scripts_dir/load_url_from_history.sh -- cgit v1.2.3 From 778ca3f14946df1738b744621807321992f556bb Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 23 May 2011 15:36:04 +0000 Subject: simplify the bookmark binding --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 7c1a8ba..24d4561 100644 --- a/examples/config/config +++ b/examples/config/config @@ -325,7 +325,7 @@ set ebind = @mode_bind global,-insert @bind = sh 'echo "event INJECT_KEYCMD $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"' # Bookmark inserting binds -@cbind m_ = sh 'echo `printf "$UZBL_URI %s"` >> "$XDG_DATA_HOME"/uzbl/bookmarks' +@cbind m_ = sh 'echo "$UZBL_URI $1" >> "$XDG_DATA_HOME"/uzbl/bookmarks' '%s' # Or use a script to insert a bookmark. @cbind M = spawn @scripts_dir/insert_bookmark.sh -- cgit v1.2.3 From e04868ba6783cfdd9efcda0b105a904cfcf64070 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Wed, 25 May 2011 14:15:50 +0000 Subject: make the variables in util/uzbl-dir.sh overrideable --- examples/data/scripts/util/uzbl-dir.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'examples') diff --git a/examples/data/scripts/util/uzbl-dir.sh b/examples/data/scripts/util/uzbl-dir.sh index 82510d8..76a7055 100644 --- a/examples/data/scripts/util/uzbl-dir.sh +++ b/examples/data/scripts/util/uzbl-dir.sh @@ -9,12 +9,12 @@ UZBL_SOCKET_DIR=/tmp # Directories UZBL_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$HOME}" -UZBL_FORMS_DIR="$UZBL_DATA_DIR/dforms" +UZBL_FORMS_DIR="${UZBL_FORMS_DIR:-$UZBL_DATA_DIR/dforms}" # Data files -UZBL_CONFIG_FILE="$UZBL_CONFIG_DIR/config" -UZBL_COOKIE_FILE="$UZBL_DATA_DIR/cookies.txt" -UZBL_BOOKMARKS_FILE="$UZBL_DATA_DIR/bookmarks" -UZBL_TEMPS_FILE="$UZBL_DATA_DIR/temps" -UZBL_HISTORY_FILE="$UZBL_DATA_DIR/history" -UZBL_SESSION_FILE="$UZBL_DATA_DIR/browser-session" +UZBL_CONFIG_FILE="${UZBL_CONFIG_FILE:-$UZBL_CONFIG_DIR/config}" +UZBL_COOKIE_FILE="${UZBL_COOKIE_FILE:-$UZBL_DATA_DIR/cookies.txt}" +UZBL_BOOKMARKS_FILE="${UZBL_BOOKMARKS_FILE:-$UZBL_DATA_DIR/bookmarks}" +UZBL_TEMPS_FILE="${UZBL_TEMPS_FILE:-$UZBL_DATA_DIR/temps}" +UZBL_HISTORY_FILE="${UZBL_HISTORY_FILE:-$UZBL_DATA_DIR/history}" +UZBL_SESSION_FILE="${UZBL_SESSION_FILE:-$UZBL_DATA_DIR/browser-session}" -- cgit v1.2.3 From ac0d4c7fb7899a7ef8fd1fe9785f47f03b9711a7 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Tue, 7 Jun 2011 09:57:25 -0600 Subject: fix divide by zero in the scroll percentage calculation --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 24d4561..8dc6c2a 100644 --- a/examples/config/config +++ b/examples/config/config @@ -91,7 +91,7 @@ set download_handler = sync_spawn @scripts_dir/download.sh #@on_event CONFIG_CHANGED print Config changed: %1 = %2 # Scroll percentage calculation -@on_event SCROLL_VERT set scroll_message = \@<(function(){var p='--';if(%3<=%4){p=(%1/(%3-%4));p=Math.round(10000*p)/100;};return p+'%';})()>\@ +@on_event SCROLL_VERT set scroll_message = \@<(function(){var p='--';if(%3<%4){p=(%1/(%3-%4));p=Math.round(10000*p)/100;};return p+'%';})()>\@ # === Behaviour and appearance =============================================== -- cgit v1.2.3 From 79270bf7f392e1a11f9b61bb94473d6751707fca Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Tue, 7 Jun 2011 13:36:14 -0600 Subject: make the SCROLL_VERT calculation clearer (and fix it) --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index 8dc6c2a..c10764c 100644 --- a/examples/config/config +++ b/examples/config/config @@ -91,7 +91,7 @@ set download_handler = sync_spawn @scripts_dir/download.sh #@on_event CONFIG_CHANGED print Config changed: %1 = %2 # Scroll percentage calculation -@on_event SCROLL_VERT set scroll_message = \@<(function(){var p='--';if(%3<%4){p=(%1/(%3-%4));p=Math.round(10000*p)/100;};return p+'%';})()>\@ +@on_event SCROLL_VERT set scroll_message = \@<(function(curr, min, max, size){if(max == size) return '--'; var p=(curr/(max - size)); return Math.round(10000*p)/100;})(%1,%2,%3,%4)>\@% # === Behaviour and appearance =============================================== -- cgit v1.2.3 From 50688d6601432c608655ce87be306839bb0784d3 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 26 Jun 2011 20:20:47 -0400 Subject: Escape '@' when following a link --- examples/data/scripts/follow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index f08bd29..3b93b0d 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -21,7 +21,7 @@ case "$result" in case "$uriaction" in set) - printf 'uri '"$uri"'\n' > "$UZBL_FIFO" + printf 'uri '"$uri"'\n' | sed -e 's/@/\\@/' > "$UZBL_FIFO" ;; clipboard) printf "$uri" | xclip -- cgit v1.2.3 From 7185af645d2741f967c99ccab546cea1d048759a Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Sun, 3 Jul 2011 05:13:21 +0000 Subject: nbsps crept into the config file --- examples/config/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/config/config b/examples/config/config index c10764c..385a60b 100644 --- a/examples/config/config +++ b/examples/config/config @@ -265,8 +265,8 @@ set ebind = @mode_bind global,-insert @cbind n = search @cbind N = search_reverse -# Print pages to a printer -@cbind  p = hardcopy +# Print pages to a printer +@cbind p = hardcopy # Web searching binds @cbind gg_ = uri http://www.google.com/search?q=\@\@ -- cgit v1.2.3 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') 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') 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