diff --git a/inc/instance-config.php b/inc/instance-config.php index 5a2837d5..90192586 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -133,6 +133,9 @@ $config['max_filesize'] = 50 * 1024 * 1024; // 50MB $config['webm']['allow_audio'] = true; $config['webm']['max_length'] = 1000; +$config['pdf_file_thumbnail'] = true; +$config['djvu_file_thumbnail'] = true; + // Allowed image file extensions. $config['allowed_ext'][] = 'jpg'; $config['allowed_ext'][] = 'jpeg'; diff --git a/js/inline-expanding.js b/js/inline-expanding.js index 5db95c09..8a6c6a1b 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -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];