I'm try to add something to the standard Google calendar script:
This is my variable:
- var full = !! entry.content.$t.match(/full/i);
And this is the "console.log"
- console.log(booked)
console.log(i)
And this is the anwer in my console:
This is a part of the Google calendar api json script:
- // loop through each event in the feed
- for (var i = 0; i < feed.entry.length; i++) {
- var entry = feed.entry[i];
- var title = entry.title.$t;
- var start = entry['gd$when'][0].startTime;
- var full = !! entry.content.$t.match(/full/i);
- console.log(booked)
- console.log(i)
- var dateString = formatGCalTime(start);
- var li = document.createElement('li');
- span = document.createElement('span');
- span.appendChild(document.createTextNode(dateString));
- li.appendChild(span).addClass('timeDate');
- li.appendChild(document.createTextNode(' ' + title));
-
- ul.appendChild(li);
- }
- events.appendChild(ul);
- }
My question is:
How do I add the text (...sorry we're booked) after a "date li" or change the color of that "date li" when it is "true"