ryvan-js / wiremonkey Goto Github PK
View Code? Open in Web Editor NEWA javascript realtime internet connection tracker and notifier.
License: MIT License
A javascript realtime internet connection tracker and notifier.
License: MIT License
I am using wiremonkey and I made some quick and dirty hack to use blockUI script so the screen gets locked when the connection is lost and unlocked when the connection is available again.
It would be nice to see this integration available in the plugin itself and would be good if the message was availble in the blockUI script itself.
Here is the reference link for blockUI: http://jquery.malsup.com/block/#overview
My attemption at the code is below, in the setInterval function:
if (!isOnline) {
$.blockUI({
ignoreIfBlocked: true,
message: 'Sem conexão. Por favor aguarde...',
});
} else {
$.unblockUI();
}
Hi,
This might be the edge case but the navigator.onLine
could be true if it's in a private network without Internet access. This is really different from the legacy way you implemented with a Google image.
By the way, your Google image way is really helpful for me :D
I tried this library.
Network connection break is detected immediately.
Internet connection break is not detected at all.
Works similar to navigator.onLine which has a similar behaviour.
“online” does not always mean connection to the internet, it can also just mean connection to some network.
I am trying to test your plugin (the demo web page) on firefox but it is not working.
Any idea why?
version 58.0.1 (64 bits), linux
I want to add some callback handler for connected and disconnected event just like as the following.
WireMonkey.on('connected', function(){
console.log('Your connection is alived.');
});
WireMonkey.on('disconnected', function(){
console.log('You are disconnected from internet.');
});
Is there any way to hook handler?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.