diff --git a/app/index.current.html b/app/index.current.html
index cadb59b..6ddb121 100644
--- a/app/index.current.html
+++ b/app/index.current.html
@@ -62,6 +62,51 @@
document.aether = {
name: 'Aether Native App (Electron and Svelte)'
};
+
+ function is_online(uri) {
+ let xhr = new XMLHttpRequest();
+ xhr.open('GET',uri,false);
+ try {
+ xhr.send(null);
+ } catch (error) {
+ console.error(error);
+ }
+ if(xhr.status == 200) {
+ //is online
+ return xhr.responseText;
+ }
+ else {
+ //is offline
+ return null;
+ }
+ }
+
+ if (is_online(native_app_config.native_app_js_css_base_url)) {
+ console.log(`Appears to be live: ${native_app_config.native_app_js_css_base_url}`);
+ } else if (native_app_config.native_app_js_css_base_url_bak) {
+ console.log(`Appears to be live: ${native_app_config.native_app_js_css_base_url_bak}`);
+ native_app_js_css_base_url = native_app_config.native_app_js_css_base_url_bak;
+ } else if (is_online('https://app.oneskyit.com')) {
+ console.log(`Appears to be live: https://app.oneskyit.com`);
+ native_app_js_css_base_url = 'https://app.oneskyit.com';
+ } else if (is_online('https://oneskyit.com')) {
+ console.log(`One Sky IT appears to be online`);
+ native_app_js_css_base_url = 'https://oneskyit.com';
+ } else if (is_online('https://google.com')) {
+ console.log(`Google appears to be online`);
+ native_app_js_css_base_url = 'https://google.com';
+ } else {
+ console.log('We are offline!');
+ }
+
+ // console.log(`One Sky IT appears to be online ${is_online('https://oneskyit.com')}`);
+ // console.log(`Google appears to be online ${is_online('https://google.com')}`);
+
+ // console.log(is_online('https://oneskyit.com'));
+ // console.log(is_online('https://cmsc.oneskyit.com'));
+ // console.log(is_online('https://dev-cmsc.oneskyit.com'));
+ // console.log(is_online('https://google.com'));
+
@@ -107,7 +152,7 @@
const client_user_jwt = {}; // Future use
let client_account_id = native_app_config.account_id;
- console.log(client_account_id);
+ // console.log(client_account_id);
// END: Client constants set by server when rendering HTML