$(document).ready(function () {
    loadMatchDetail();
});

window.addEventListener("online", function (e) {
    loadMatchDetail();
});


function loadMatchDetail() {
    var matchId = getParameterByName("matchId");
    app.CurrentView = new app.MatchDetailView({ match: matchId });
}

document.addEventListener("visibilitychange", function () {
    if (document.hidden) {
        console.log("App is hidden");
    }
    else {
        loadMatchDetail();
    }
});

