diff options
| author | Georg Lukas <georg@op-co.de> | 2019-03-12 17:54:12 +0100 |
|---|---|---|
| committer | Georg Lukas <georg@op-co.de> | 2019-03-12 17:54:12 +0100 |
| commit | 082d9519f2be0ed5f8ee2362698b5dca61d51081 (patch) | |
| tree | d81511ff5fcd9083a865feb0e68b814805b5ba2e /scripts | |
| parent | adb12a1b801e864847067758d625d24047cb363c (diff) | |
| parent | 34dcb428410be3cf9c6179b69fda12f31181292f (diff) | |
| download | php-xmpp-invitation-082d9519f2be0ed5f8ee2362698b5dca61d51081.tar.gz | |
Merge branch 'os-recommedations', thx JBB and LNJ
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/main.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/main.js b/scripts/main.js index 7f9bc8d..cc13762 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -17,8 +17,7 @@ } } - function load_clients() { - var url = "clients.json"; + function load_clients(url) { var request = new XMLHttpRequest(); request.open('GET', url); request.onreadystatechange = function () { @@ -93,7 +92,19 @@ i18n.setLocale('en'); // functionality - load_clients(); + if (navigator.userAgent.indexOf("Android") >= 0) { + load_clients("clients_Android.json") + } + else if (navigator.userAgent.indexOf("Linux") >= 0) { + load_clients("clients_Linux.json") + } + else if (navigator.userAgent.indexOf("iPhone") >= 0) { + load_clients("clients_iOS.json") + } + else { + load_clients("clients_Linux.json") + } + window.addEventListener("hashchange", rehash, false); document.getElementById("url_in").addEventListener("focus", function(event) { event.target.select(); |
