Notify users when not in online environment
Closed this issue · 3 comments
Add a check to notify the user when he is not in an online environment.
I figure this would be best handled by detecting that the page is running
on the file:// protocol. PERHAPS it could also detect some other
likely-error scenarios such as http://localhost/ or http://127.0.0.1/
Of course, it's going to be impossible to detect something like
http://my-computer-name/ but there's only so far we can go.
Also, perhaps it might be worth adding a 'debug' parameter (false by
default) which means that the plugin can return some more thorough error
information (say via console.log) if things like the image-loading was a
failure.
Just throwing some ideas around really …
Craig Fowler
Managing Director
CSF Software Limited
http://csf-dev.com
Telephone: +44 (0) 7855 620157
CSF Software Limited is a company registered in England and Wales, #7786461
Registered office: 4 Pryors Close, Bishop's Stortford, Herts, CM23 5JX
On 23 October 2014 11:51, Dirk Groenen notifications@github.com wrote:
Add a check to notify the user when he is not in an online environment.
—
Reply to this email directly or view it on GitHub
#23.
Testing it in the browser is almost impossible, but there are some possible ways:
- test for file://
- test for .TLD
Of course this isn't bullet proof at all. So that's why I want to do the testing in the server-side script. Just let it check if it can download the files, if not; return some debugging information and let it be thrown in the console or something like that.
Most of the issues here are related to not being able to debug the script. So it indeed might be a good idea to let the plugin and server return more errors when they occur.
Please check the new version (3.0.0) for better debug information.