[wiki] [sites] Cleaning up the middle click user script page. || Christoph Lohmann

From: <hg_AT_suckless.org>
Date: Wed, 29 Aug 2012 09:13:57 +0200 (CEST)

changeset: 970:93c6d3044587
tag: tip
user: Christoph Lohmann <20h_AT_r-36.net>
date: Wed Aug 29 09:11:49 2012 +0200
files: surf.suckless.org/files/middle_click_link.md
description:
Cleaning up the middle click user script page.


diff -r 318bfa4c0f62 -r 93c6d3044587 surf.suckless.org/files/middle_click_link.md
--- a/surf.suckless.org/files/middle_click_link.md Sun Aug 26 11:19:55 2012 -0400
+++ b/surf.suckless.org/files/middle_click_link.md Wed Aug 29 09:11:49 2012 +0200
_AT_@ -7,26 +7,28 @@
 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);
+ (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);
-})();
+ }, 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
+The last version of this script is
+[here](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 Wed Aug 29 2012 - 09:13:57 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:32:31 CEST