diff --git a/src/modules/localeq/localeq.qml b/src/modules/localeq/localeq.qml index 0abdebfc9..ffd87f5b5 100644 --- a/src/modules/localeq/localeq.qml +++ b/src/modules/localeq/localeq.qml @@ -34,6 +34,32 @@ Page { //Needs to come from .conf/geoip property var hasInternet: true + function getInt(format) { + var requestURL = "https://example.org/"; + var xhr = new XMLHttpRequest; + + xhr.onreadystatechange = function() { + if (xhr.readyState === XMLHttpRequest.DONE) { + + if (xhr.status !== 200) { + console.log("Disconnected!!"); + var connected = false + hasInternet = connected + return; + } + + else { + console.log("Connected!!"); + } + } + } + xhr.open("GET", requestURL, true); + xhr.send(); + } + Component.onCompleted: { + getInt(); + } + Loader { id: image anchors.horizontalCenter: parent.horizontalCenter