function addtime(e) { e.preventDefault(); document.getElementById("seconds").value = this.dataset.secs; } function pvw(e) { prev = document.getElementById("prev_desc"); prev.innerHTML = desc.value; prev.style.display = "block"; prev.addEventListener("input", function() { desc.value = prev.innerHTML; }); } document.addEventListener("DOMContentLoaded", function(e) { var list = document.getElementById("timelist"); if (list) { var secs = document.getElementById("timelist").getElementsByTagName("a"); for(var i=0;i