Merge pull request #115 from nonmakina/pdfThumbnail
Turns on thumbnails for pdf and djvu filetypes
This commit is contained in:
commit
663233f34d
|
@ -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';
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue