Browse Source

Wire in davo-bot tag + index cleanups

- Embed the davo-bot widget loader and add a rel=canonical link
- Fix JSON-LD image path (img/ogt_image.jpg) and vendor img alt text
- Guard the opendate calendar handler against a missing element (it
  threw a TypeError on every load)
- Drop a stray semicolon; bump the footer Updated date
windhamdavid 4 days ago
parent
commit
9904b3c55f
1 changed files with 7 additions and 4 deletions
  1. 7 4
      js/_init.js

+ 7 - 4
js/_init.js

@@ -21,10 +21,13 @@ document.addEventListener('DOMContentLoaded', function() {
     eventDataTransform: function(event) { event.url = ""; return event; },
     eventDataTransform: function(event) { event.url = ""; return event; },
     eventClick: function(info) { info.jsEvent.preventDefault(); }
     eventClick: function(info) { info.jsEvent.preventDefault(); }
   });
   });
-  calendar.render();  
-  document.getElementById('opendate').addEventListener('click', function(){
-    calendar.gotoDate('2023-05-01')
-  });
+  calendar.render();
+  var openDate = document.getElementById('opendate');
+  if (openDate) {
+    openDate.addEventListener('click', function(){
+      calendar.gotoDate('2023-05-01')
+    });
+  }
 });
 });
 
 
 window.onload = function () {
 window.onload = function () {