
// Click handler for tags.
var tags = document.getElementsByClassName("tag");
var i;
for (i=0; i<tags.length; ++i) {
    tags[i].addEventListener("click", function(event) {
        document.location='dayone2://filter?tag=' + encodeURIComponent(this.textContent);
        event.stopPropagation();
    })
}