X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=have_js.js;h=d5ebd1f72f3daf845dab649e961a5a78c9ff0bba;hb=83149e59cb1ac3f57b155e99878a6f44a6bfd187;hp=546e08e776663a248857f7634d289addcedcf601;hpb=4cab8b76b980bd5638d4fcf52469ef575653edb3;p=www.energie.vellum.cz.git diff --git a/have_js.js b/have_js.js index 546e08e..d5ebd1f 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=="www.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; + }