]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/embed.js.erb
Merge remote-tracking branch 'upstream/pull/5176'
[rails.git] / app / assets / javascripts / embed.js.erb
index 4ebb89da93134a422133640e6680119c6ab9e752..9a0ec07d31d85855c06a02d0179d29f7a298d207 100644 (file)
@@ -5,13 +5,13 @@
 //= require i18n
 //= require i18n/embed
 
-window.onload = function () {
-  if (navigator.languages) {
-    I18n.locale = navigator.languages[0];
-  } else if (navigator.language) {
-    I18n.locale = navigator.language;
-  }
+if (navigator.languages) {
+  I18n.locale = navigator.languages[0];
+} else if (navigator.language) {
+  I18n.locale = navigator.language;
+}
 
+window.onload = function () {
   var query = (window.location.search || '?').slice(1),
       args  = {};