Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions js/config.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// for navigator language
var lang = window.navigator.language;
// you can change the language
//var lang = 'en';
// var lang = 'en';

//change weather params here:
//units: metric or imperial
Expand All @@ -17,13 +17,20 @@ var feed = 'http://feeds.nos.nl/nosjournaal?format=rss';
//var feed = 'http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml';

// compliments:
var compliments = [
'Hey, handsome!',
'Hi, sexy!',
var morning = [
'Good morning, handsome!',
'Enjoy your day!',
'How was your sleep?'
];

var afternoon = [
'Hello, beauty!',
'You look sexy!',
'Looking good today!'
];

var evening = [
'Wow, you look hot!',
'Looking good today!',
'You look nice!',
'Enjoy your day!'
];
'Hi, sexy!'
];
12 changes: 11 additions & 1 deletion js/main.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,17 @@ jQuery(document).ready(function($) {
{
//see compliments.js
while (compliment == lastCompliment) {
compliment = Math.floor(Math.random()*compliments.length);

//Check for current time
var compliments;
var date = new Date();
var hour = date.getHours();
//set compliments to use
if (hour >= 3 && hour < 12) compliments = morning;
if (hour >= 12 && hour < 17) compliments = afternoon;
if (hour >= 17 || hour < 3) compliments = evening;

compliment = Math.floor(Math.random()*compliments.length);
}

$('.compliment').updateWithText(compliments[compliment], 4000);
Expand Down