diff --git a/4chan_x.user.js b/4chan_x.user.js index 688abe813..41691d22b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1961,9 +1961,6 @@ }; quoteBacklink = { init: function() { - quoteBacklink.opbl = !conf['OP Backlinks']; - quoteBacklink.qp = conf['Quote Preview']; - quoteBacklink.qi = conf['Quote Inline']; return g.callbacks.push(function(root) { var container, el, id, link, qid, quote, quotes, _i, _len, _ref, _results; if (/inline/.test(root.className)) { @@ -1984,7 +1981,7 @@ if (!(el = d.getElementById(qid))) { continue; } - if (quoteBacklink.opbl && el.className === 'op') { + if (!conf['OP Backlinks'] && el.className === 'op') { continue; } link = $.el('a', { @@ -1992,12 +1989,12 @@ className: 'backlink', textContent: ">>" + id }); - if (quoteBacklink.qp) { + if (conf['Quote Preview']) { $.bind(link, 'mouseover', quotePreview.mouseover); $.bind(link, 'mousemove', ui.hover); $.bind(link, 'mouseout', quotePreview.mouseout); } - if (quoteBacklink.qi) { + if (conf['Quote Inline']) { $.bind(link, 'click', quoteInline.toggle); } if (!(container = $('.container', el))) { diff --git a/script.coffee b/script.coffee index f910991dc..c45080955 100644 --- a/script.coffee +++ b/script.coffee @@ -1539,9 +1539,6 @@ titlePost = quoteBacklink = init: -> - quoteBacklink.opbl = ! conf['OP Backlinks'] - quoteBacklink.qp = conf['Quote Preview'] - quoteBacklink.qi = conf['Quote Inline'] g.callbacks.push (root) -> return if /inline/.test root.className # op or reply @@ -1555,16 +1552,16 @@ quoteBacklink = for qid of quotes continue unless el = d.getElementById qid #don't backlink the op - continue if quoteBacklink.opbl and el.className is 'op' + continue if !conf['OP Backlinks'] and el.className is 'op' link = $.el 'a', href: "##{id}" className: 'backlink' textContent: ">>#{id}" - if quoteBacklink.qp + if conf['Quote Preview'] $.bind link, 'mouseover', quotePreview.mouseover $.bind link, 'mousemove', ui.hover $.bind link, 'mouseout', quotePreview.mouseout - if quoteBacklink.qi + if conf['Quote Inline'] $.bind link, 'click', quoteInline.toggle unless container = $ '.container', el container = $.el 'span', className: 'container'