Berikan skala Grey Offlien ke situs web

window.addEventListener('online', function(e) {
    // add your logic to update the UI when online
    console.log("You are online");
    document.body.style.filter = 'grayscale(0)';
}, false);

window.addEventListener('offline', function(e) {
    // add your logic to update the UI when offline
    console.log("You are offline");
    document.body.style.filter = 'grayscale(1)';
}, false);
CoderHJ