Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

give gray offlien scale to website

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);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #give #gray #offlien #scale #website
ADD COMMENT
Topic
Name
1+7 =