diff --git a/contrib/js/expand-image.js b/contrib/js/expand-image.js index 32b1c8c..3efbdc8 100644 --- a/contrib/js/expand-image.js +++ b/contrib/js/expand-image.js @@ -4,10 +4,6 @@ // released into the public domain by Jeff on 2016-04-30 // -if (typeof _ == 'undefined') { - var _ = function(a) { return a; } -} - // is the filename matching an image? function filenameIsImage(fname) { return /\.(gif|jpeg|jpg|png|webp)/.test(fname); @@ -19,7 +15,7 @@ function setupInlineImage(thumb, url) { thumb.inlineIsSetUp = true; var img = thumb.querySelector("img.thumbnail"); var expanded = false; - var oldurl = img.href; + var oldurl = img.src; img.onclick = function(ev) { if (expanded) { img.setAttribute("class", "thumbnail"); @@ -69,4 +65,4 @@ onready(function(){ observer.observe(document.body, {childList: true, subtree: true}); } -}) +}); diff --git a/contrib/js/expand-video.js b/contrib/js/expand-video.js index 5ef2c2b..07b6a0f 100644 --- a/contrib/js/expand-video.js +++ b/contrib/js/expand-video.js @@ -3,10 +3,6 @@ var configRoot = ""; -if (typeof _ == 'undefined') { - var _ = function(a) { return a; }; -} - function setupVideo(thumb, url) { if (thumb.videoAlreadySetUp) return; thumb.videoAlreadySetUp = true; diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index d5d7939..042e158 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -15,12 +15,10 @@ parent.appendChild(wrapper);parent.backlink=false;},function(msg){var wrapper=do 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