aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/follow.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-11 20:45:32 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-11 20:45:32 -0500
commit6b2a973e17a0cf4d3cdc88e71973624929018c78 (patch)
tree7f6ea0734b348d45728136e07f2f94ba18a9eb42 /examples/data/scripts/follow.sh
parent6c2890bbc664fb067bafda638417b92dc9fdd58d (diff)
Allow the variable for follow.sh to be changed
Diffstat (limited to 'examples/data/scripts/follow.sh')
-rwxr-xr-xexamples/data/scripts/follow.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh
index 4edab36..6401188 100755
--- a/examples/data/scripts/follow.sh
+++ b/examples/data/scripts/follow.sh
@@ -5,17 +5,20 @@
. "$UZBL_UTIL_DIR/uzbl-util.sh"
+key_variable="$1"
+shift
+
keys="$1"
shift
# if socat is installed then we can change Uzbl's input mode once a link is
# selected; otherwise we just select a link.
if ! which socat >/dev/null 2>&1; then
- print "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" > "$UZBL_FIFO"
+ print "script @scripts_dir/follow.js \"@{$key_variable} $keys\"\n" > "$UZBL_FIFO"
exit 0
fi
-result="$( print "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" | socat - "unix-connect:$UZBL_SOCKET" )"
+result="$( print "script @scripts_dir/follow.js \"@{$key_variable} $keys\"\n" | socat - "unix-connect:$UZBL_SOCKET" )"
case $result in
*XXXEMIT_FORM_ACTIVEXXX*)
# a form element was selected