diff options
author | Mason Larobina <mason.larobina@gmail.com> | 2009-12-05 17:12:59 +0800 |
---|---|---|
committer | Mason Larobina <mason.larobina@gmail.com> | 2009-12-05 17:12:59 +0800 |
commit | 4ba53742159e166fd25cc5c83a953bc1e39c81d9 (patch) | |
tree | 6b20c9b2e505ec904eda7cda06944c1467e28858 /examples/config/uzbl | |
parent | ae4f28681d7aae24674990e2bf28c503ec5e3fed (diff) |
Added @jsh JavaScript helper variable.
Diffstat (limited to 'examples/config/uzbl')
-rw-r--r-- | examples/config/uzbl/config | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config index a9ae29a..54de972 100644 --- a/examples/config/uzbl/config +++ b/examples/config/uzbl/config @@ -29,6 +29,8 @@ set shell_cmd = sh -c # Spawn path shortcuts. In spawn the first dir+path match is used in "dir1:dir2:dir3:executable" set scripts_dir = $XDG_DATA_HOME/uzbl:@prefix/share/uzbl/examples/data/uzbl:scripts +# Javascipt helpers. +set jsh = js var run=Uzbl.run; function get(k){return run("print \\\@"+k)}; function set(k, v) {run("set "+k+" = "+v)}; # === Handlers =============================================================== @@ -141,7 +143,6 @@ set open_new_window = sh 'uzbl-browser -u \@SELECTED_URI' @bind <Button2> = js if("\@SELECTED_URI") { Uzbl.run("\@open_new_window"); } else { Uzbl.run("\\\@load_from_xclip"); } # Edit HTML forms in external editor -# set external_editor = gvim #set external_editor = xterm -e vim @bind E = script @scripts_dir/extedit.js |