<script>


    function autoRefresh_div() {
            $( "#main").load(window.location.href + " #main");
        }

    var connectionMessage = "internet connection";
    var noConnectionMessage = "No internet connection.";
    window.onload = checkInternetConnection;
    function checkInternetConnection() {
        var isOnLine = navigator.onLine;
        if (isOnLine) {
            autoRefresh_div();
        } else {
            Swal.fire({
                title: 'Oops!!',
                icon: 'error',
                text: 'There is no Internet Connection',
                width: 600,
                padding: '3em',
                color: '#716add',
                confirmButtonText: 'Reload Page',
                background: '#fff url(/img/maintenance.png)',
                backdrop: `
                    rgba(0,0,123,0.4)
                    left top
                    no-repeat
                `
                })
        }
    }

    setInterval(checkInternetConnection, 5000);
</script><?php /**PATH /home2/morttacy/morttsonsposfiles/resources/views/inc/check-internet.blade.php ENDPATH**/ ?>