Merge commit 'duc/experimental' into experimental
authorBarrucadu <mike@barrucadu.co.uk>
Tue, 19 May 2009 11:12:36 +0000 (12:12 +0100)
committerBarrucadu <mike@barrucadu.co.uk>
Tue, 19 May 2009 11:12:36 +0000 (12:12 +0100)
Conflicts:
examples/configs/sampleconfig-dev

1  2 
examples/configs/sampleconfig
examples/configs/sampleconfig-dev
uzbl.c
uzbl.h

@@@ -95,12 -96,14 +96,14 @@@ bind    S         = js alert("hi")
  # example showing how to use sh
  # it sends a command to the fifo, whose path is told via a positional param
  # if fifo_dir is not set, it'll echo to a file named (null) somewhere >:) remember to delete it
- bind    XS        = sh 'echo "act script alert (\"This is sent by the shell via a fifo\")" > "$4"'
+ # Parameters are separated by spaces and the script body must be one parameter, so enclose it in
+ # quotes and escape any inner quotes using backslashes
+ bind    XS        = sh 'echo "act script alert (\'This is sent by the shell via a fifo\')" > "$4"'
  # Keyboard based link following: work in progress! No C DOM bindings yet, no click() event for hyperlinks so no referrer set..Quite basic but does the job for now...
  #hit F to toggle the Hints (now in form of link numbering)
 -bind    F= script for (var i=0; i < document.links.length; i++) {var uzblid = 'uzbl_link_hint_';var li = document.links[i];var pre = document.getElementById(uzblid+i);if (pre) {li.removeChild(pre);} else {var hint = document.createElement('div');hint.setAttribute('id',uzblid+i);hint.innerHTML = i;hint.style.display='inline';hint.style.lineHeight='90%';hint.style.backgroundColor='red';hint.style.color='white';hint.style.fontSize='small-xx';hint.style.fontWeight='light';hint.style.margin='0px';hint.style.padding='2px';hint.style.position='absolute';hint.style.textDecoration='none';hint.style.left=li.style.left;hint.style.top=li.style.top;li.insertAdjacentElement('afterBegin',hint);}}
 +bind    F= script /usr/share/uzbl/examples/scripts/hint.js
  #hit f followed by linknumber and ENTER to follow that link
 -bind    f_        = script window.location = document.links[%s].href;
 +bind    f_        = js window.location = document.links[%s].href;
  
  # "home" page if you will
  set uri = uzbl.org
@@@ -77,8 -78,10 +78,10 @@@ bind    gh        = uri http://www.uzbl
  bind    o _       = uri %s
  bind    :wiki _   = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
  bind    gg _      = uri http://www.google.com/search?q=%s
 -bind    i         = insert_mode
 -#TODO: no 'toggle' command?
 +bind    i         = toggle_insert_mode
 +bind    I         = toggle_insert_mode 0 # disable insert mode (1 to enable)
+ # Enclose the executable in quotes if it has spaces.  Any additional parameters you use will
+ # appear AFTER the default parameters
  bind    B         = spawn ./examples/scripts/insert_bookmark.sh
  bind    U         = spawn ./examples/scripts/load_url_from_history.sh
  bind    u         = spawn ./examples/scripts/load_url_from_bookmarks.sh
@@@ -96,12 -99,16 +99,16 @@@ bind    S         = js alert("hi")
  # example showing how to use sh
  # it sends a command to the fifo, whose path is told via a positional param
  # if fifo_dir is not set, it'll echo to a file named (null) somewhere >:) remember to delete it
- bind    XS        = sh 'echo "act script alert (\"This is sent by the shell via a fifo\")" > "$4"'
+ # The body of the shell command should be one parameter, so if it has spaces like here,
+ # you must enclose it in quotes.  Remember to escape (and double-escape) quotes and backslashes
+ # in the body.  Any additional parameters you use will appear AFTER the default parameters (cfg file
+ # path, fifo & socket dirs, etc.)
+ bind    XS        = sh 'echo "act script alert (\'This is sent by the shell via a fifo\')" > "$4"'
  # Keyboard based link following: work in progress! No C DOM bindings yet, no click() event for hyperlinks so no referrer set..Quite basic but does the job for now...
  #hit F to toggle the Hints (now in form of link numbering)
 -bind    F= script for (var i=0; i < document.links.length; i++) {var uzblid = 'uzbl_link_hint_';var li = document.links[i];var pre = document.getElementById(uzblid+i);if (pre) {li.removeChild(pre);} else {var hint = document.createElement('div');hint.setAttribute('id',uzblid+i);hint.innerHTML = i;hint.style.display='inline';hint.style.lineHeight='90%';hint.style.backgroundColor='red';hint.style.color='white';hint.style.fontSize='small-xx';hint.style.fontWeight='light';hint.style.margin='0px';hint.style.padding='2px';hint.style.position='absolute';hint.style.textDecoration='none';hint.style.left=li.style.left;hint.style.top=li.style.top;li.insertAdjacentElement('afterBegin',hint);}}
 +bind    F= script ./examples/scripts/hint.js
  #hit f followed by linknumber and ENTER to follow that link
 -bind    f_        = script window.location = document.links[%s].href;
 +bind    f_        = js window.location = document.links[%s].href;
  
  # "home" page if you will
  set uri = uzbl.org
diff --cc uzbl.c
Simple merge
diff --cc uzbl.h
Simple merge