habitica/ui/connectionAlert/index.js

16 lines
349 B
JavaScript
Raw Normal View History

2012-06-21 00:47:08 +00:00
exports.create = function(model) {
this.connect = function() {
// Hide the reconnect link for a second after clicking it
model.set('hideReconnect', true)
setTimeout(function() {
model.set('hideReconnect', false)
}, 1000)
model.socket.socket.connect()
}
this.reload = function() {
window.location.reload()
}
}