diff --git a/contrib/js/expand-image.js b/contrib/js/expand-image.js index 3af3965..e363b59 100644 --- a/contrib/js/expand-image.js +++ b/contrib/js/expand-image.js @@ -16,9 +16,7 @@ function setupInlineImage(thumb, url) { var img = thumb.querySelector("img.thumbnail"); var expanded = false; var oldurl = img.src; - thumb.href = "#"; - thumb.target = undefined; - img.addEventListener("click", function(ev) { + thumb.onclick = function() { if (expanded) { img.setAttribute("class", "thumbnail"); img.src = oldurl; @@ -28,7 +26,8 @@ function setupInlineImage(thumb, url) { img.src = url; expanded = true; } - }, false); + return false; + } } // set up image inlining for all applicable children in an element diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 84f5ae3..add41ea 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -16,7 +16,8 @@ parent.backlink=true;}};parent.backlink=true;} function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx