]> git.pld-linux.org Git - packages/uzbl.git/commitdiff
- remove all javascript commands that are broken by last security fix from default...
authorpawelz <pawelz@pld-linux.org>
Tue, 12 Jan 2010 14:50:20 +0000 (14:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- substitute javascipt yank with shell script
- patches by Mason Larobina <mason (dot) larobina (at) gmail (dot) com>

Changed files:
    uzbl-config-nojs.patch -> 1.1

uzbl-config-nojs.patch [new file with mode: 0644]

diff --git a/uzbl-config-nojs.patch b/uzbl-config-nojs.patch
new file mode 100644 (file)
index 0000000..a5b5471
--- /dev/null
@@ -0,0 +1,70 @@
+commit 36029e1faf0761607e3192fb4968f3228d84af9f
+Author: Mason Larobina <mason.larobina@gmail.com>
+Date:   Sat Jan 9 13:47:54 2010 +0800
+
+    Comment out anything in the config that used @jsh or the Uzbl object.
+
+commit c6756f9373b837aa3ff499f1e6bd7477d0eec361
+Author: Mason Larobina <mason.larobina@gmail.com>
+Date:   Mon Jan 11 20:05:32 2010 +0800
+
+    Fix yank bind now that the Uzbl object is gone.
+
+diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config
+index 3edb36c..e53dd1a 100644
+--- a/examples/config/uzbl/config
++++ b/examples/config/uzbl/config
+@@ -35,7 +35,7 @@ set shell_cmd       = sh -c
+ 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)};
++#set jsh = js var run=Uzbl.run; function get(k){return run("print \\\@"+k)}; function set(k, v) {run("set "+k+" = "+v)};
+ # === Handlers ===============================================================
+@@ -71,7 +71,7 @@ set new_window          = sh 'uzbl-browser -u $8'
+ # Generate a FORM_ACTIVE event if an editable
+ # element on the loaded site has initial focus
+-@on_event   LOAD_FINISH    js if(document.activeElement.type == 'text') {Uzbl.run("event FORM_ACTIVE");}
++#@on_event   LOAD_FINISH    js if(document.activeElement.type == 'text') {Uzbl.run("event FORM_ACTIVE");}
+ # Switch to insert mode if a (editable) html form is clicked
+ @on_event   FORM_ACTIVE    @set_mode insert
+@@ -192,9 +192,9 @@ set ebind = @mode_bind global,-insert
+ # Middle click
+ # if clicked on a link open the link in a new uzbl window
+ # otherwise open the selection in the current window
+-set load_from_xclip = sh 'echo "uri $(xclip -o)" > $4'
+-set open_new_window = sh 'uzbl-browser -u \@SELECTED_URI'
+-@bind <Button2> = @jsh if(get("SELECTED_URI")) { run("\@open_new_window"); } else { run("\\\@load_from_xclip"); }
++#set load_from_xclip = sh 'echo "uri $(xclip -o)" > $4'
++#set open_new_window = sh 'uzbl-browser -u \@SELECTED_URI'
++#@bind <Button2> = @jsh if(get("SELECTED_URI")) { run("\@open_new_window"); } else { run("\\\@load_from_xclip"); }
+ # === Keyboard bindings ======================================================
+@@ -276,7 +276,7 @@ set toggle_cmd_ins = @toggle_modes command insert
+ @cbind  gh  = uri http://www.uzbl.org
+ # --- Yanking & pasting binds ---
+-@cbind  y<Yank (t)itle or (u)rl:>* = @jsh if('%s' == 'u') { run("sh 'echo -n $6 | xclip'"); } else if('%s' == 't') { run("sh 'echo -n $7 | xclip'"); }; run('event SET_KEYCMD');
++#@cbind  y<Yank (t)itle or (u)rl:>* = @jsh if('%s' == 'u') { run("sh 'echo -n $6 | xclip'"); } else if('%s' == 't') { run("sh 'echo -n $7 | xclip'"); }; run('event SET_KEYCMD');
+ # Go the page from primary selection
+ @cbind  p   = sh 'echo "uri `xclip -selection primary -o`" > $4'
+diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config
+index e53dd1a..2832505 100644
+--- a/examples/config/uzbl/config
++++ b/examples/config/uzbl/config
+@@ -276,7 +276,8 @@ set toggle_cmd_ins = @toggle_modes command insert
+ @cbind  gh  = uri http://www.uzbl.org
+ # --- Yanking & pasting binds ---
+-#@cbind  y<Yank (t)itle or (u)rl:>* = @jsh if('%s' == 'u') { run("sh 'echo -n $6 | xclip'"); } else if('%s' == 't') { run("sh 'echo -n $7 | xclip'"); }; run('event SET_KEYCMD');
++@cbind  yu  = sh 'echo -n $6 | xclip'
++@cbind  yt  = sh 'echo -n $7 | xclip'
+ # Go the page from primary selection
+ @cbind  p   = sh 'echo "uri `xclip -selection primary -o`" > $4'
This page took 0.072164 seconds and 4 git commands to generate.