X-Git-Url: http://git.jankratochvil.net/?p=www.energie.vellum.cz.git;a=blobdiff_plain;f=have_js.js;h=19a3360997ebdd7a5c3257fe4135c667f53e4464;hp=546e08e776663a248857f7634d289addcedcf601;hb=7bbc72911fa79440bf4e16e2a6c823726a29731a;hpb=1009be8bc14e18d6660d2d287d009bf609d5dbc1 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; + }