    clearInterval(backgroundInterval);
                clearTimeout(backgroundTimeout);
                visibleElement(connectionStatus);
            }, 1100);
        } else {
            showErrorMessage(status + " " + statusText + "\n" + responseText);
        }

        hideLoader();
    }

    function showLoader() {
        showElement(loader)
    }

    function hideLoader() {
        hideElement(loader)
    }

    // endregion

    // region Utils
    function copyToClipboard(text) {
        if (nav