Fixes inline-expanding.js to allow clickable pdf thumbnails

This commit is contained in:
nonmakina 2021-01-09 16:41:05 -06:00
parent 3f57632d44
commit dd37756f24

View File

@ -100,7 +100,8 @@ $(document).ready(function(){
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/) && !link[i].className.match(/file/)) {
link[i].childNodes[0].src && link[i].childNodes[0].className.match(/post-image/) && !link[i].className.match(/file/) &&
!link[i].href.match("\\.(pdf|djvu|djv)$") ) {
link[i].onclick = function(e) {
var img, post_body, still_open, canvas, scroll;
var thumb = this.childNodes[0];