From 7bbc72911fa79440bf4e16e2a6c823726a29731a Mon Sep 17 00:00:00 2001 From: short <> Date: Sun, 14 Apr 2002 11:32:42 +0000 Subject: [PATCH] +Prevent redirection of some top (referring) foreign webpage as it may not pass "have_js=1" to us anyway. (for example Google cache) --- have_js.js | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/have_js.js b/have_js.js index 546e08e..19a3360 100644 --- a/have_js.js +++ b/have_js.js @@ -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; + } -- 1.8.3.1