mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
test messages
This commit is contained in:
parent
18e4c5f0e5
commit
dd06336a0d
17
js/main.js
17
js/main.js
@ -23,6 +23,9 @@ jQuery(document).ready(function($) {
|
|||||||
|
|
||||||
var news = [];
|
var news = [];
|
||||||
var newsIndex = 0;
|
var newsIndex = 0;
|
||||||
|
|
||||||
|
var lastCompliment;
|
||||||
|
var compliment;
|
||||||
|
|
||||||
(function checkVersion()
|
(function checkVersion()
|
||||||
{
|
{
|
||||||
@ -60,13 +63,19 @@ jQuery(document).ready(function($) {
|
|||||||
|
|
||||||
(function updateCompliment()
|
(function updateCompliment()
|
||||||
{
|
{
|
||||||
var compliments = ['Hey, handsome!','Hi, sexy!','Hello, beauty!', 'You look sexy!', 'Wow, you look hot!'];
|
//var compliments = ['Hey, handsome!','Hi, sexy!','Hello, beauty!', 'You look sexy!', 'Wow, you look hot!'];
|
||||||
var i = Math.floor(Math.random()*compliments.length);
|
var compliments = ['Testing ...', 'Please wait ...'];
|
||||||
$('.compliment').updateWithText(compliments[i], 4000);
|
|
||||||
|
while (compliment == lastCompliment) {
|
||||||
|
compliment = Math.floor(Math.random()*compliments.length);
|
||||||
|
}
|
||||||
|
$('.compliment').updateWithText(compliments[compliment], 4000);
|
||||||
|
|
||||||
|
lastCompliment = compliment;
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
updateCompliment();
|
updateCompliment();
|
||||||
}, 20000);
|
}, 5000);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(function updateWeather()
|
(function updateWeather()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user