23.02.2017, 08:20
Add this to Custom CSS:
And this to Custom JS:
Code:
.offline {
position: absolute;
z-index: 9999;
top: 10px;
right: 10px;
padding: 10px;
background-color: rgba(255, 0, 0, 0.5);
}
And this to Custom JS:
Code:
$(function() {
if (typeof localbus !== 'undefined') {
var offline = $('<div class="hide offline"></div>')
.text('No connection')
.appendTo('body');
setInterval(function() {
offline.toggleClass('hide', !!localbus.ws);
}, 1000);
}
});