diff --git a/4chan_x.coffee b/4chan_x.coffee index bc20ae44c..00b1e2534 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -435,6 +435,7 @@ imageResize = (cw, ch, imageType, image) -> if iw > cw image.style.width = '100%' image.style.margin = '0px' + break when 'fit screen' ratio = Math.min cw/iw, ch/ih if ratio < 1 diff --git a/4chan_x.js b/4chan_x.js index 06fe80168..c2ec73cb5 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -620,8 +620,9 @@ case 'fit width': if (iw > cw) { image.style.width = '100%'; - return image.style.margin = '0px'; + image.style.margin = '0px'; } + break; case 'fit screen': ratio = Math.min(cw / iw, ch / ih); if (ratio < 1) {