summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-03-16 11:50:06 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2014-03-16 12:14:33 -0400
commit1d91a7996a5ade0915cd340c5726baa3c0986e04 (patch)
treea9ed73c93d8c9657fb1e2a623259dc3e738d08f3 /www
parenta5ddbc8592875f5ea552ad29bf32d3a4bd78a655 (diff)
downloadhtml5ks-1d91a7996a5ade0915cd340c5726baa3c0986e04.tar.xz
html5ks-1d91a7996a5ade0915cd340c5726baa3c0986e04.zip
Merge branch 'master' of happinessforme.com:html5ks
Conflicts: Makefile Modernizr
Diffstat (limited to 'www')
-rw-r--r--www/warned.html15
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>