From fa4dec36db3d593caab6774a308a12617aeb7374 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sun, 18 Aug 2013 16:40:07 +1000 Subject: [PATCH 01/13] Don't expand non-images --- js/inline-expanding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/inline-expanding.js b/js/inline-expanding.js index ac477409..ed5a57b5 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -16,7 +16,7 @@ onready(function(){ var link = this.getElementsByTagName('a'); for (var i = 0; i < link.length; i++) { - if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].childNodes[0].className.match(/post-image/)) { + if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].childNodes[0].className.match(/post-image/) && !link[i].className.match(/file/)) { link[i].childNodes[0].style.maxWidth = '95%'; link[i].onclick = function(e) { if (this.childNodes[0].className == 'hidden') From dcf97d6b5b5715388412f18544c2e63f877ba19f Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sun, 18 Aug 2013 18:17:12 +1000 Subject: [PATCH 02/13] Add optional modifier: to tell Tinyboard that even though an image might have a thumbnail, it could still be a non-image upload --- templates/post_reply.html | 2 +- templates/post_thread.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/post_reply.html b/templates/post_reply.html index 65fd576c..bc3d36cd 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -91,7 +91,7 @@ )