From: x2003bruneau Date: Mon, 23 Apr 2007 18:13:30 +0000 (+0000) Subject: display=light propagation again X-Git-Tag: xorg/0.9.14~57 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=e173ee9b7e29b11c13c3bc5124d200cba6675cce;p=platal.git display=light propagation again git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1733 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 4b386d5..0ce3169 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -169,11 +169,8 @@ function auto_links() { node.onclick = function () { window.open(this.href); return false; }; } if (node.href.indexOf(fqdn) > -1 && light) { - if (node.href.indexOf('?') > -1) { - node.href = node.href + '&display=light'; - } else { - node.href = node.href + '?display=light'; - } + node.href = node.href.replace(/([^\#\?]*)\??([^\#]*)(\#.*)?/, + "$1?display=light&$2$3"); } if(node.className == 'popup2') { node.onclick = function () { popWin(this,840,600); return false; };