Code Monkey home page Code Monkey logo

heyoffline's People

Contributors

akatz avatar imkingdavid avatar oskarkrawczyk avatar shashankmehta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heyoffline's Issues

Issues in Firefox 29.0.1

The script doesn't work on Mozilla Firefox 29.0.1 (Windows 7).

But works fine on the same machine with -
Google Chrome 35.0.1916.153 m
Opera 22.0.1471.70
Internet Explorer 11.0.9600

Android 2.3.x

It doesn't work on Webkit browser but it works on Firefox Mobile

No checkup at startup ?

This project is just awesome !
But there's a thing that embarrass me, it's not possible to check the network when the website opens.
I would be usefull if the website is available offline (thanks to the HTML5 manifest).

Useful!!!

I just want to say this is really useful for me. I am creating a web text editor and want to tell users if they can save. If it is alright I would like to build on this API.

onOnline and onOffline are reversed?

Please see the code below, the output of console.log shows that onOnline and onOffline events are the opposite of network availability. (meaning that onOnline triggered when disconnected from the wifi, and onOffline triggered when reconnected to wifi)
The modal window show and hide are correct.

$(function () {
new Heyoffline({
onOnline: function () {
console.log("online now");
},
onOffline: function () {
console.log("offline now");
}
});
});

please advise,
Thank you,

Does not work on Windows 7

I switched my Wi fi off for about 60 seconds. But then I did not see any DOM change to reflect the functioning of your online demo script. Is there anything more I need to do?

Thanks. Great project btw.

Customize heyoffline texts

I am trying to change the texts of the heyoffline script. Unfortunately, i'm not being able to change it's options, like such:

new Heyoffline({
text: {
title: "Heading",
content: "WarningMessage",
button: "Close Alert"
}
});

It tells me that "object is not a function". My console is telling me that "Heyoffline" is an object, not a function.
Without any adjustments, if I disconnect my wifi, it displays your heyoffline popup just fine.

Any clue what I am missing here?

TIA, Jasper

Rewrite

  • Rewrite into ES6
  • Consider external CSS
  • Configurable message template
  • Remove CoffeeScript remains
  • Discard Bower stuff
  • Publish on NPM

Custom text

I can't figure out how to change the text. I've tried with the following code

new Heyoffline({
  text.title: "Heading",
  text.content: "Warning Text",
  text.button: "Close Warning" 
} ) ;

But I just get some error messages. Uncaught SyntaxError: Unexpected token .

What could be wrong?

element.addEventListener breaks IE8

  • Love the project
  • Unfortunately, it seems that heyoffline.js:24 (return element.addEventListener(event, fn, useCapture);) gives this error:

"Object doesn't support this property or method"

  • After a little research, it seems that if the addEventListener function is not available you can use attachEvent.
  • I'll give it a shot and see if I can contribute a fix for it, but no guarantees :)

Missing supported browser/required features list in readme

Would be useful to update the readme to have a list of supported browsers or, alternately, a description of what features are required for this to work.

My first impression of this was that it did not work because I tried the demo in Firefox 19.0.2 (which does not support the features required by this utility).

Issues in Linux

Hey there. Great little script - works fine in Chromium under Ubuntu, but doesnt in Firefox. Also fails in a Windows 7 virtualbox under Safari and Firefox, havent tested Chrome yet. Just an FYI, hope to see improvements in the future!

What type of offline?

I tested this by disconnection my network connection while on the demo site and it didn't detect I had lost my connection.

So is this script only for mobile devices? Or for when the browser is set to Work Offline ?

Does not work on Firefox.

Tested on Firefox 17.0.

I undestand that firefox spec is not standard regarding the online/offline events. But it should trigger at least when the user clicks on "work offline" which is not the case currently.

Thanks.

Not working when through proxy

I connect to the Internet via ssh proxy tunnel. If I disable the proxy tunnel message won't appear (it'll appear only when I disconnect from Wi-Fi).

Mac OS X 10.8.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.