HubSpot / offline

Automatically display online/offline indication to your users

Home Page:http://github.hubspot.com/offline/docs/welcome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with hotspots / open zones

sadikyalcin opened this issue · comments

If you connect to a router that requires you to login I.E. hotspots or open zones, Offline returns online but connection fails of course because you can't actually get past the router.

At this stage the plugin returns a 405 Method Not Allowed but state is UP. Can I set the state to offline in such case?

Offline.options = {
    checkOnLoad: false, checks: {
        xhr: {
            url: '...'
        }
    },
        reconnect: {
            initialDelay: 15
        }
};

Offline.check();

Offline.on('down', function() {
     console.log('Offline');
});

Offline.on('up', function() {
    console.log('Online');
});

screen shot 2017-02-21 at 11 32 46

screen shot 2017-02-21 at 11 33 00