From b7117afaeb26c6eff23e3df931a5f86880c51b6d Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 27 Nov 2011 19:23:19 +0100 Subject: [PATCH] Use the moz selector hack only on Firefox. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index cce234d7f..2337972b5 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2855,7 +2855,7 @@ img = $.el('img', { src: a.href }); - if (a.parentNode.className !== 'op') { + if (engine === "Gecko" && a.parentNode.className !== 'op') { filesize = $('.filesize', a.parentNode); _ref = filesize.textContent.match(/(\d+)x/), _ = _ref[0], max = _ref[1]; img.style.maxWidth = "-moz-calc(" + max + "px)"; diff --git a/script.coffee b/script.coffee index f76caa804..53129bc54 100644 --- a/script.coffee +++ b/script.coffee @@ -2188,7 +2188,7 @@ imgExpand = a = thumb.parentNode img = $.el 'img', src: a.href - unless a.parentNode.className is 'op' + if engine is "Gecko" and a.parentNode.className isnt 'op' filesize = $ '.filesize', a.parentNode [_, max] = filesize.textContent.match /(\d+)x/ img.style.maxWidth = "-moz-calc(#{max}px)"