(function() {
  'use strict';

  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.register('/service-worker.js', { scope: '/' });
  }

  var content = document.getElementById('content'),
      txt = document.getElementsByClassName('txt')[0];

  function getContent(pageToFetch) {
    fetch(pageToFetch)
      .then(function(response) {
        return response.text();
      }).then(function (text) {
        highlightUpdatedContent();
        content.setAttribute('markdown', text);
      });
  }

  function highlightUpdatedContent() {
    txt.classList.add('changed');
    setTimeout(function() {
      txt.classList.remove('changed');
    }, 800);
  }

  page('/', function() {
    getContent('content/next-event.md');
  });

  page('/about', function() {
    getContent('content/about.md');
  });

  page('/past', function() {
    getContent('content/past-events.md');
  });

  page({hashbang: true});
})();

@@ -25,16 +25,19 @@
 ict';%0A%0A 
+ //
  if ('se
@@ -66,16 +66,19 @@
 tor) %7B%0A 
+ //
    navig
@@ -141,24 +141,27 @@
 e: '/' %7D);%0A 
+ //
  %7D%0A%0A  var co

disable SW