[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Sat, 3 Oct 2009 17:22:39 +0000 (UTC)

changeset: 283:d570097be46b
tag: tip
parent: 281:59909696f80e
user: Julien Steinhauser
date: Sat Oct 03 19:15:20 2009 +0200
files: surf.suckless.org/files/middle_click_link.md
description:
Added surf.suckless.org/files/middle_click_link.md


diff -r 59909696f80e -r d570097be46b surf.suckless.org/files/middle_click_link.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/files/middle_click_link.md Sat Oct 03 19:15:20 2009 +0200
_AT_@ -0,0 +1,32 @@
+MIDDLE CLICK LINKS
+==================
+
+Description
+-----------
+
+This script must be deployed into the ~/.surf/user.js and one will be able to open link
+in a new window with middleclick or with control click.
+
+(function() {
+ window.addEventListener("click", function(e) {
+ if (
+ e.button == 1 // for middle click
+ //|| e.ctrlKey // for ctrl + click
+ ) {
+ var new_uri = e.srcElement.href;
+ if (new_uri) {
+ e.stopPropagation();
+ e.preventDefault();
+ window.open(new_uri);
+ }
+ }
+ }, false);
+})();
+
+Author
+------
+
+- Original author n30n , actual revision chm.duquesne.
+
+The last version of this script is on http://www.uzbl.org/wiki/middle_click_links
+under a [CC Attribution-Noncommercial-Share Alike 3.0 Unported license](http://creativecommons.org/licenses/by-nc-sa/3.0/).
Received on Sat Oct 03 2009 - 19:22:39 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:30:52 CEST