forked from MagicMirrorOrg/MagicMirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
executable file
·60 lines (45 loc) · 1.04 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
jQuery.fn.updateWithText = function(text, speed)
{
var dummy = $('<div/>').html(text);
if ($(this).html() != dummy.html())
{
$(this).fadeOut(speed/2, function() {
$(this).html(text);
$(this).fadeIn(speed/2, function() {
//done
});
});
}
}
jQuery.fn.outerHTML = function(s) {
return s
? this.before(s).remove()
: jQuery("<p>").append(this.eq(0).clone()).html();
};
function roundVal(temp)
{
return Math.round(temp * 10) / 10;
}
jQuery(document).ready(function($) {
var eventList = [];
var lastCompliment;
var compliment;
moment.locale(config.lang);
//connect do Xbee monitor
// var socket = io.connect('http://rpi-alarm.local:8082');
// socket.on('dishwasher', function (dishwasherReady) {
// if (dishwasherReady) {
// $('.dishwasher').fadeIn(2000);
// $('.lower-third').fadeOut(2000);
// } else {
// $('.dishwasher').fadeOut(2000);
// $('.lower-third').fadeIn(2000);
// }
// });
version.init();
time.init();
calendar.init();
compliments.init();
weather.init();
news.init();
});