From 6c5aed6a3c6bcd03c1e57d779b8b2a473ee1ec6e Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 30 Apr 2016 08:30:14 -0400 Subject: [PATCH] bugfix --- contrib/js/expand-image.js | 8 ++------ contrib/js/expand-video.js | 4 ---- contrib/static/nntpchan.js | 8 +++----- 3 files changed, 5 insertions(+), 15 deletions(-) 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