diff options
author | Abyss777 <abyss@fox5.ru> | 2016-12-22 13:51:42 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-12-22 13:51:42 +0500 |
commit | ca3109cce72bfc780960d468c2fcf6a75f39a859 (patch) | |
tree | a4922661ae14f4c7c3516023bf347445bb632ae9 /web/load.js | |
parent | 5bccab1d99586777b346d474b34b764e3b595a92 (diff) | |
download | trackermap-web-ca3109cce72bfc780960d468c2fcf6a75f39a859.tar.gz trackermap-web-ca3109cce72bfc780960d468c2fcf6a75f39a859.tar.bz2 trackermap-web-ca3109cce72bfc780960d468c2fcf6a75f39a859.zip |
- Add support for custom report colors
- Style fixes
Diffstat (limited to 'web/load.js')
-rw-r--r-- | web/load.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/web/load.js b/web/load.js index cd012f18..4dedd770 100644 --- a/web/load.js +++ b/web/load.js @@ -1,5 +1,5 @@ (function () { - var debugMode, touchMode, locale, localeParameter, extjsVersion, fontAwesomeVersion, olVersion; + var debugMode, touchMode, locale, localeParameter, extjsVersion, fontAwesomeVersion, olVersion, i, language, languages; function addStyleFile(file) { var link = document.createElement('link'); @@ -78,13 +78,13 @@ localeParameter = window.location.search.match(/locale=([^&#]+)/); locale.language = localeParameter && localeParameter[1]; if (!(locale.language in locale.languages)) { - var languages = window.navigator.languages !== undefined ? window.navigator.languages.slice() : []; - var language = window.navigator.userLanguage || window.navigator.language; + languages = window.navigator.languages !== undefined ? window.navigator.languages.slice() : []; + language = window.navigator.userLanguage || window.navigator.language; languages.push(language); - languages.push(language.substr(0,2)); - languages.push("en"); //default - for (var i = 0; i < languages.length; i ++) { - var language = languages[i].replace("-", "_"); + languages.push(language.substr(0, 2)); + languages.push('en'); //default + for (i = 0; i < languages.length; i++) { + language = languages[i].replace('-', '_'); if (language in locale.languages) { locale.language = language; break; |