diff --git a/4chan_x.user.js b/4chan_x.user.js index 21e6d015d..64bc685e0 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2364,11 +2364,11 @@ }, resize: function(e) { var style; - if (style = $('style[media=chan]', d.head)) { + if (style = $('style.height', d.head)) { $.rm(style); } style = $.addStyle("body.fitheight img[md5] + img { max-height: " + d.body.clientHeight + "px }"); - return style.media = 'chan'; + return style.className = 'height'; } }; NAMESPACE = 'AEOS.4chan_x.'; diff --git a/script.coffee b/script.coffee index 11176b497..a68586a82 100644 --- a/script.coffee +++ b/script.coffee @@ -1788,9 +1788,9 @@ imgExpand = $.prepend delform, controls resize: (e) -> - $.rm style if style = $ 'style[media=chan]', d.head + $.rm style if style = $ 'style.height', d.head style = $.addStyle "body.fitheight img[md5] + img { max-height: #{d.body.clientHeight}px }" - style.media = 'chan' + style.className = 'height' #main NAMESPACE = 'AEOS.4chan_x.'