+Prevent redirection of some top (referring) foreign webpage as it
authorshort <>
Sun, 14 Apr 2002 11:32:42 +0000 (11:32 +0000)
committershort <>
Sun, 14 Apr 2002 11:32:42 +0000 (11:32 +0000)
  may not pass "have_js=1" to us anyway. (for example Google cache)

have_js.js

index 546e08e..19a3360 100644 (file)
@@ -1,15 +1,20 @@
 // $Id$
 
-var searchN=window.location.search;
-if (searchN=="" || searchN=="?")
-       searchN="?";
-else
-       searchN+="&";
-searchN+="have_js=1";
+// Prevent redirection of some top (referring) foreign webpage as it
+// may not pass "have_js=1" to us anyway. (for example Google cache)
 
-window.location.href
-       =window.location.protocol+"//"
-       +window.location.hostname
-       +window.location.pathname
-       +window.location.hash
-       +searchN;
+if (window.location.hostname=="energie.vellum.cz") {
+       var searchN=window.location.search;
+       if (searchN=="" || searchN=="?")
+               searchN="?";
+       else
+               searchN+="&";
+       searchN+="have_js=1";
+
+       window.location.href
+                       =window.location.protocol+"//"
+                       +window.location.hostname
+                       +window.location.pathname
+                       +window.location.hash
+                       +searchN;
+       }