From: Florent Bruneau Date: Mon, 2 May 2011 18:47:19 +0000 (+0200) Subject: Open the current href instead of the href the markup had when the page was X-Git-Tag: xorg/1.1.1~33 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=7ffe1c54e1c251ad36fb95ac975d3486e6a8215c;p=platal.git Open the current href instead of the href the markup had when the page was loaded (Closes #1482) Javascript is so much fun... and so much pain at once. Functional programming is of these things that let you believe you are smarter than you really are because solving such a simple bug requires so much understanding of what really happen. Signed-off-by: Florent Bruneau --- diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 031e77b..47bf78b 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -179,7 +179,7 @@ function auto_links() { } if ((!href.contains(fqdn) && !this.className.contains('popup')) || node.hasClass('popup')) { node.click(function () { - window.open(href); + window.open(this.href); return false; }); }