test messages

This commit is contained in:
Michael Teeuw 2014-02-19 17:19:54 +01:00
parent 18e4c5f0e5
commit dd06336a0d

View File

@ -24,6 +24,9 @@ jQuery(document).ready(function($) {
var news = []; var news = [];
var newsIndex = 0; var newsIndex = 0;
var lastCompliment;
var compliment;
(function checkVersion() (function checkVersion()
{ {
$.getJSON('githash.php', {}, function(json, textStatus) { $.getJSON('githash.php', {}, function(json, textStatus) {
@ -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()