mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
Initial commit of V2.
This commit is contained in:
60
old_version/js/main.js
Executable file
60
old_version/js/main.js
Executable file
@@ -0,0 +1,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();
|
||||
|
||||
});
|
Reference in New Issue
Block a user