<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <!-- Metro 4 -->
    <link rel="stylesheet" href="pandora/vendors/metro4/css/metro-all.min.css">
    <link rel="stylesheet" href="pandora/css/index.css">

    <title>Pandora :: Preloader</title>
</head>
<body class="m4-cloak h-vh-100 d-flex flex-justify-center flex-align-center flex-column bg-white">
<div id="isinya">
    <div id="loading" style="display:none">
        <div data-role="activity" data-type="cycle" data-style="color" class="mx-auto"></div>
    </div>
</div>
<script src="pandora/vendors/jquery/jquery-3.4.1.min.js"></script>
<script src="pandora/vendors/metro4/js/metro.min.js"></script>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8" src="cordova_plugins.js"></script>
<script>
$(document).ready(function(){
$(document).ajaxStart(function()
{
$('#loading').show();
}).ajaxStop(function()
{
$('#loading').hide();
});
});
</script>
<script type="text/javascript" charset="utf-8">
    //var y=document.getElementById("gps");
    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {
      window.plugins.mocklocationchecker.check(successCallback, errorCallback);
    }

    function successCallback(result) {
      //console.log(result); // true - enabled, false - disabled
      //alert('ini hasile'+JSON.stringify(result));
      //alert('mocknya '+result['isMock']);
      if (result['isMock']){
         window.location='./gpspalsu.html';
        } else {
        window.location='./absensi.html';
        }
    }

    function errorCallback(error) {
      console.log(error);
    }
    </script>
</body>
</html>
