diff --git a/4chan_x.user.js b/4chan_x.user.js index 0f2cc082f..f38c41f10 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2419,7 +2419,7 @@ if (a.parentNode.className !== 'op') { filesize = $('span.filesize', a.parentNode); _ref2 = filesize.textContent.match(/(\d+)x/), _ = _ref2[0], max = _ref2[1]; - img.setAttribute('style', "max-width: -moz-calc(" + max + "px);"); + img.style.maxWidth = "-moz-calc(" + max + "px)"; } return a.appendChild(img); }, diff --git a/script.coffee b/script.coffee index 7f70f0cb1..19adb312a 100644 --- a/script.coffee +++ b/script.coffee @@ -1812,7 +1812,7 @@ imgExpand = unless a.parentNode.className is 'op' filesize = $ 'span.filesize', a.parentNode [_, max] = filesize.textContent.match /(\d+)x/ - img.setAttribute 'style', "max-width: -moz-calc(#{max}px);" + img.style.maxWidth = "-moz-calc(#{max}px)" a.appendChild img dialog: ->