display=light propagation again
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 23 Apr 2007 18:13:30 +0000 (18:13 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 23 Apr 2007 18:13:30 +0000 (18:13 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1733 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/javascript/xorg.js

index 4b386d5..0ce3169 100644 (file)
@@ -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; };