Re: [dev][surf] Next schedule?

From: Julien Steinhauser <Julien.Steinhauser_AT_orange.fr>
Date: Thu, 1 Oct 2009 21:20:39 +0200

On Thu, Oct 01, 2009 at 07:04:52AM -0500, hailukah wrote:
 
> Speaking of middle click, is there a way to specify what it does? I've
> searched through the webkitgtk documentation but haven't found
> anything. I'd just like to middle click to open a link in a new
> window. Even a javascript solution would be great.
>
>
Hello, this function is from uzbl wiki, it does the trick.
 
(function() {
        window.addEventListener("click", function(e) {
                if (e.button === 1) {
                        var new_uri = e.srcElement.href;
                        if (new_uri) {
                                e.stopPropagation();
                                e.preventDefault();
                                window.open(new_uri);
                        }
                }
        }, false);
})();
Received on Thu Oct 01 2009 - 19:20:39 UTC

This archive was generated by hypermail 2.2.0 : Thu Oct 01 2009 - 19:24:03 UTC