Skip to content

Commit 5c275c6

Browse files
committed
-
1 parent 6b05bb8 commit 5c275c6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@
33
---
44

55
<script type="text/javascript">
6-
$.ajax({
6+
/* $.ajax({
77
url: "http://ajaxhttpheaders.appspot.com",
88
dataType: 'jsonp',
99
success: function(headers) {
1010
language = headers['Accept-Language'];
1111
redirectSite(language);
1212
}
1313
});
14+
*/
15+
$.ready(function() {
16+
var userLang = navigator.language || navigator.userLanguage;
17+
redirectSite(language);
18+
});
1419

1520
function redirectSite(lang) {
1621
if(lang.indexOf('it')>=0) {
@@ -19,7 +24,7 @@
1924
window.location.href="en/index.html";
2025
}
2126
}
22-
</script>
27+
</script>
2328

2429
<div class="row">
2530
<div class="col-md-12">

0 commit comments

Comments
 (0)