From 0bb8f015d75eea75d1171508cc7387f8a886d5ab Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 11 Jun 2011 13:25:43 +0200 Subject: [PATCH] Don't unexpand when inlining. --- 4chan_x.user.js | 3 +++ script.coffee | 1 + 2 files changed, 4 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index 0a55fb130..a3325146e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2324,6 +2324,9 @@ } a = thumb.parentNode; $.bind(a, 'click', imgExpand.cb.toggle); + if (root.className === 'inline') { + return; + } if (imgExpand.on) { return imgExpand.toggle(a); } diff --git a/script.coffee b/script.coffee index 620503551..c9694269c 100644 --- a/script.coffee +++ b/script.coffee @@ -1742,6 +1742,7 @@ imgExpand = return unless thumb = $ 'img[md5]', root a = thumb.parentNode $.bind a, 'click', imgExpand.cb.toggle + return if root.className is 'inline' if imgExpand.on then imgExpand.toggle a toggle: (e) -> return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0