diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2014-03-16 11:50:06 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2014-03-16 12:14:33 -0400 |
commit | 1d91a7996a5ade0915cd340c5726baa3c0986e04 (patch) | |
tree | a9ed73c93d8c9657fb1e2a623259dc3e738d08f3 /www/warned.html | |
parent | a5ddbc8592875f5ea552ad29bf32d3a4bd78a655 (diff) | |
download | html5ks-1d91a7996a5ade0915cd340c5726baa3c0986e04.tar.xz html5ks-1d91a7996a5ade0915cd340c5726baa3c0986e04.zip |
Merge branch 'master' of happinessforme.com:html5ks
Conflicts:
Makefile
Modernizr
Diffstat (limited to 'www/warned.html')
-rw-r--r-- | www/warned.html | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/www/warned.html b/www/warned.html index 99779ed..e3daf67 100644 --- a/www/warned.html +++ b/www/warned.html @@ -1,11 +1,16 @@ <!DOCTYPE html> -<html><head> -<script> +<html><head><script> document.cookie = "warned=1; Expires=Tue, 19 Jan 2038 00:00:00 GMT; HttpOnly"; +var l = /language=[^&]*/.exec(location.search).replace(/[ \t]/g, '').split(","); +loop: for (var i = 0; i < l.length; i++) { + switch (l[i].split(';')[0]) { + case "en": var lang = "en"; break loop; + case "fr": var lang = "fr"; break loop; + } +} localStorage.persistent = { hdisable: location.search.indexOf("hdisable=on") > -1, - language: location.search.search("language=.*[=,]en") > -1 ? "en" : "fr" + language: lang || "en" }; location.replace("./"); -</script> -</head><body>If you're seeing this, something's gone wrong. Go back and report a bug.</body></html> +</script></head><body>If you're seeing this, something's gone wrong. Go back and try again, and if it still doesn't work, file a bug.</body></html> |