assets/live.js
function (url, type) {
      switch (type.toLowerCase()) {
        // css files can be reloaded dynamically by replacing the link element                               
        case "text/css":
          var link = currentLinkElements[url],
              html = document.body.parentNode,
              head = link.parentNode,
              next = link.nextSibling,
              newLink = document.createElement("link");

          html.className = html.className.replace(/\s*livejs\-loading/gi, '') + ' livejs-loading';
          newLink.setAttribute("type", "text/css");
          newLink.setAttribute("rel", "stylesheet");
          newLink.setAttribute("href", url + "?now=" + new Date() * 1);
          next ? head.insertBefore(newLink, next) : head.appendChild(newLink);
          currentLinkElements[url] = newLink;
          oldLinkElements[url] = link;

          // schedule removal of the old link
          Live.removeoldLinkElements();
          break;

        // check if an html resource is our current url, then reload                               
        case "text/html":
          if (url != document.location.href)
            return;

          // local javascript changes cause a reload as well
        case "text/javascript":
        case "application/javascript":
        case "application/x-javascript":
          document.location.reload();
      }
    }
function (url, type) {
      switch (type.toLowerCase()) {
        // css files can be reloaded dynamically by replacing the link element                               
        case "text/css":
          var link = currentLinkElements[url],
              html = document.body.parentNode,
              head = link.parentNode,
              next = link.nextSibling,
              newLink = document.createElement("link");

          html.className = html.className.replace(/\s*livejs\-loading/gi, '') + ' livejs-loading';
          newLink.setAttribute("type", "text/css");
          newLink.setAttribute("rel", "stylesheet");
          newLink.setAttribute("href", url + "?now=" + new Date() * 1);
          next ? head.insertBefore(newLink, next) : head.appendChild(newLink);
          currentLinkElements[url] = newLink;
          oldLinkElements[url] = link;

          // schedule removal of the old link
          Live.removeoldLinkElements();
          break;

        // check if an html resource is our current url, then reload                               
        case "text/html":
          if (url != document.location.href)
            return;

          // local javascript changes cause a reload as well
        case "text/javascript":
        case "application/javascript":
        case "application/x-javascript":
          document.location.reload();
      }
    }
function ( url , type ) { switch ( type . toLowerCase ( ) ) { // css files can be reloaded dynamically by replacing the link element                               
 case "text/css" : var link = currentLinkElements [ url ] , html = document . body . parentNode , head = link . parentNode , next = link . nextSibling , newLink = document . createElement ( "link" ) ; html . className = html . className . replace ( / \s*livejs\-loading / gi , '' ) + ' livejs-loading' ; newLink . setAttribute ( "type" , "text/css" ) ; newLink . setAttribute ( "rel" , "stylesheet" ) ; newLink . setAttribute ( "href" , url + "?now=" + new Date ( ) * 1 ) ; next ? head . insertBefore ( newLink , next ) : head . appendChild ( newLink ) ; currentLinkElements [ url ] = newLink ; oldLinkElements [ url ] = link ; // schedule removal of the old link
 Live . removeoldLinkElements ( ) ; break ; // check if an html resource is our current url, then reload                               
 case "text/html" : if ( url != document . location . href ) return ; // local javascript changes cause a reload as well
 case "text/javascript" : case "application/javascript" : case "application/x-javascript" : document . location . reload ( ) ; } }
act upon a changed url of certain content type
act upon a changed url of certain content type