|
|
@@ -220,19 +220,20 @@ function makeBlockElem(block, prevBlock) { |
|
|
|
linksElem.appendChild(blockstreamLink); |
|
|
|
|
|
|
|
// Thing to close the details. |
|
|
|
let closeElem = document.createElement("div"); |
|
|
|
closeElem.classList.add("closebtn"); |
|
|
|
closeElem.innerHTML = "close"; |
|
|
|
closeElem.onclick = function() { |
|
|
|
//let closeElem = document.createElement("div"); |
|
|
|
//closeElem.classList.add("closebtn"); |
|
|
|
//closeElem.innerHTML = "close"; |
|
|
|
linksElem.onclick = function() { |
|
|
|
console.log("foobar"); |
|
|
|
// This is such a hack but it works. We have to do this because the |
|
|
|
// onclick for the entry we're removing it from here *still gets run* |
|
|
|
// when we pick up the click here. This just defers removing it until |
|
|
|
// we're about to render the next frame, so we're sure we remove it. |
|
|
|
window.requestAnimationFrame(function() { |
|
|
|
entry.classList.remove("blbselected"); |
|
|
|
entry.classList.add("blbselected"); |
|
|
|
}); |
|
|
|
}; |
|
|
|
detailElem.appendChild(closeElem); |
|
|
|
//detailElem.appendChild(closeElem); |
|
|
|
|
|
|
|
/* ===== Finalize ===== */ |
|
|
|
|