diff --git a/js/post-hover.js b/js/post-hover.js index aa4f5c60..4f4e7448 100644 --- a/js/post-hover.js +++ b/js/post-hover.js @@ -217,6 +217,12 @@ onready(function(){ } else { thumb_url = (this.isSpoiler) ? '/static/spoiler.png' : '/static/file.png'; } + + // truncate long filenames + if (this.filename.length > 23) { + this.filename = this.filename.substr(0, 22) + '…'; + } + // file infos var $ele = $('
')
@@ -224,7 +230,7 @@ onready(function(){
.append(''+ this.filename + file_ext +'')
.append(' ('+ bytesToSize(this.fsize) +', '+ this.w +'x'+ this.h +')')
);
- if (multifile) $ele.addClass('multifile').css('max-width', '200px');
+ if (multifile) $ele.addClass('multifile').css('width', this.thumb_w + 30);
// image
var $img = $('')