From a064101244e368812b05094f1843ec8a581ebaeb Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 20 Jul 2011 14:19:43 -0700 Subject: [PATCH] don't repeat yourself --- 4chan_x.user.js | 3 ++- script.coffee | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 1f026ffe7..e580fbda6 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2510,7 +2510,8 @@ g.callbacks.push(imgExpand.node); imgExpand.dialog(); $.bind(window, 'resize', imgExpand.resize); - return imgExpand.style = $.addStyle("body.fitheight img[md5] + img { max-height: " + d.body.clientHeight + "px }"); + imgExpand.style = $.addStyle(''); + return imgExpand.resize(); }, node: function(root) { var a, thumb; diff --git a/script.coffee b/script.coffee index a3f58bd3a..191518f55 100644 --- a/script.coffee +++ b/script.coffee @@ -1888,7 +1888,8 @@ imgExpand = g.callbacks.push imgExpand.node imgExpand.dialog() $.bind window, 'resize', imgExpand.resize - imgExpand.style = $.addStyle "body.fitheight img[md5] + img { max-height: #{d.body.clientHeight}px }" + imgExpand.style = $.addStyle '' + imgExpand.resize() node: (root) -> return unless thumb = $ 'img[md5]', root