XMPP invitation landing page, without javascript
Recommend different clients depending on the operating system
Jonah BrĂ¼chert 2019-03-12
parent adb12a1 · commit f73b7eb
-rw-r--r--clients_android.json (renamed from clients.json)3
-rw-r--r--clients_desktop.json5
-rw-r--r--clients_iphone.json3
-rw-r--r--lang/en.json2
-rw-r--r--scripts/main.js17
5 files changed, 25 insertions, 5 deletions
diff --git a/clients.json b/clients_android.json
index 8fbec2b..6ed6c7e 100644
--- a/clients.json
+++ b/clients_android.json
@@ -1,5 +1,6 @@
[
- "<strong><a href=\"https://play.google.com/store/apps/details?id=org.yaxim.androidclient\">yaxim</a></strong> - lightweight classic UI",
"<strong><a href=\"https://play.google.com/store/apps/details?id=eu.siacs.conversations\">Conversations</a></strong> - modern and featureful",
+ "<strong><a href=\"https://play.google.com/store/apps/details?id=com.xabber.android\">Xabber</a></strong> - focus on user experience and interoperability",
+ "<strong><a href=\"https://play.google.com/store/apps/details?id=org.yaxim.androidclient\">yaxim</a></strong> - lightweight classic UI",
"<strong><a href=\"https://play.google.com/store/apps/details?id=org.yaxim.bruno\">Bruno</a></strong> - cute and cuddly (based on yaxim)"
]
diff --git a/clients_desktop.json b/clients_desktop.json
new file mode 100644
index 0000000..024ac44
--- /dev/null
+++ b/clients_desktop.json
@@ -0,0 +1,5 @@
+[
+ "<strong><a href=\"https://dino.im/\">Dino</a></strong> - modern, clean and GNOME integrated",
+ "<strong><a href=\"https://git.kaidan.im/kaidan/kaidan\">Kaidan</a></strong> - modern, convergent and cross-platform",
+ "<strong><a href=\"https://gajim.org/\">Gajim</a></strong> - full-featured"
+]
diff --git a/clients_iphone.json b/clients_iphone.json
new file mode 100644
index 0000000..63e5a29
--- /dev/null
+++ b/clients_iphone.json
@@ -0,0 +1,3 @@
+[
+ "<strong><a href=\"https://itunes.apple.com/us/app/chatsecure/id464200063\">ChatSecure</a></strong> - Encrypted Messenger for iOS"
+]
diff --git a/lang/en.json b/lang/en.json
index ac90f47..5a3c3de 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -12,7 +12,7 @@
"":""
},
"clients": "If this link does not work, you need to install and configure an XMPP client, and visit this page again afterwards.",
- "recommend": "On Android we recommend one of:",
+ "recommend": "We recommend one of:",
"checkfulllist": "Check the <a href='http://xmpp.org/software/clients.html'>full list of XMPP clients</a> for other platforms.",
"xmppis": "XMPP is a provider independent form of instant messaging. You can pick from many different clients and have a free choice of server operators to participate.",
"":""
diff --git a/scripts/main.js b/scripts/main.js
index 7f9bc8d..4f2f207 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_desktop.json")
+ }
+ else if (navigator.userAgent.indexOf("iPhone") >= 0) {
+ load_clients("clients_iphone.json")
+ }
+ else {
+ load_clients("clients_desktop.json")
+ }
+
window.addEventListener("hashchange", rehash, false);
document.getElementById("url_in").addEventListener("focus", function(event) {
event.target.select();