diff --git a/4chan_x.js b/4chan_x.js index 0b6473fe6..7c31493d5 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1200,7 +1200,9 @@ init: function() { var node; node = $('form[name=delform] > *:not([id])'); - return threading.thread(node); + $.bind(d.body, threading.preventDefault); + threading.thread(node); + return $.unbind(d.body, threading.preventDefault); }, thread: function(node) { var div, op; @@ -1227,6 +1229,9 @@ if (!(node.align || node.nodeName === 'CENTER')) { return threading.thread(node); } + }, + preventDefault: function(e) { + return e.preventDefault(); } }; threadHiding = { diff --git a/script.coffee b/script.coffee index e4c765cc9..7184e4709 100644 --- a/script.coffee +++ b/script.coffee @@ -930,7 +930,10 @@ threading = init: -> # don't thread image controls node = $ 'form[name=delform] > *:not([id])' + # don't confuse other scripts *cough*/b/ackwash*cough* + $.bind d.body, threading.preventDefault threading.thread node + $.unbind d.body, threading.preventDefault thread: (node) -> op = $.el 'div', @@ -957,6 +960,9 @@ threading = unless node.align or node.nodeName is 'CENTER' threading.thread node + preventDefault: (e) -> + e.preventDefault() + threadHiding = init: -> hiddenThreads = $.getValue "hiddenThreads/#{g.BOARD}/", {}