This commit is contained in:
James Campos 2011-07-23 23:13:53 -07:00
parent 2b80fe699d
commit 84ed535b29
2 changed files with 6 additions and 12 deletions

View File

@ -1961,9 +1961,6 @@
}; };
quoteBacklink = { quoteBacklink = {
init: function() { init: function() {
quoteBacklink.opbl = !conf['OP Backlinks'];
quoteBacklink.qp = conf['Quote Preview'];
quoteBacklink.qi = conf['Quote Inline'];
return g.callbacks.push(function(root) { return g.callbacks.push(function(root) {
var container, el, id, link, qid, quote, quotes, _i, _len, _ref, _results; var container, el, id, link, qid, quote, quotes, _i, _len, _ref, _results;
if (/inline/.test(root.className)) { if (/inline/.test(root.className)) {
@ -1984,7 +1981,7 @@
if (!(el = d.getElementById(qid))) { if (!(el = d.getElementById(qid))) {
continue; continue;
} }
if (quoteBacklink.opbl && el.className === 'op') { if (!conf['OP Backlinks'] && el.className === 'op') {
continue; continue;
} }
link = $.el('a', { link = $.el('a', {
@ -1992,12 +1989,12 @@
className: 'backlink', className: 'backlink',
textContent: ">>" + id textContent: ">>" + id
}); });
if (quoteBacklink.qp) { if (conf['Quote Preview']) {
$.bind(link, 'mouseover', quotePreview.mouseover); $.bind(link, 'mouseover', quotePreview.mouseover);
$.bind(link, 'mousemove', ui.hover); $.bind(link, 'mousemove', ui.hover);
$.bind(link, 'mouseout', quotePreview.mouseout); $.bind(link, 'mouseout', quotePreview.mouseout);
} }
if (quoteBacklink.qi) { if (conf['Quote Inline']) {
$.bind(link, 'click', quoteInline.toggle); $.bind(link, 'click', quoteInline.toggle);
} }
if (!(container = $('.container', el))) { if (!(container = $('.container', el))) {

View File

@ -1539,9 +1539,6 @@ titlePost =
quoteBacklink = quoteBacklink =
init: -> init: ->
quoteBacklink.opbl = ! conf['OP Backlinks']
quoteBacklink.qp = conf['Quote Preview']
quoteBacklink.qi = conf['Quote Inline']
g.callbacks.push (root) -> g.callbacks.push (root) ->
return if /inline/.test root.className return if /inline/.test root.className
# op or reply # op or reply
@ -1555,16 +1552,16 @@ quoteBacklink =
for qid of quotes for qid of quotes
continue unless el = d.getElementById qid continue unless el = d.getElementById qid
#don't backlink the op #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', link = $.el 'a',
href: "##{id}" href: "##{id}"
className: 'backlink' className: 'backlink'
textContent: ">>#{id}" textContent: ">>#{id}"
if quoteBacklink.qp if conf['Quote Preview']
$.bind link, 'mouseover', quotePreview.mouseover $.bind link, 'mouseover', quotePreview.mouseover
$.bind link, 'mousemove', ui.hover $.bind link, 'mousemove', ui.hover
$.bind link, 'mouseout', quotePreview.mouseout $.bind link, 'mouseout', quotePreview.mouseout
if quoteBacklink.qi if conf['Quote Inline']
$.bind link, 'click', quoteInline.toggle $.bind link, 'click', quoteInline.toggle
unless container = $ '.container', el unless container = $ '.container', el
container = $.el 'span', className: 'container' container = $.el 'span', className: 'container'