commit
dfa4d17ba6
@ -2336,11 +2336,10 @@
|
||||
format = conf['backlink'].replace(/%id/, "' + id + '");
|
||||
quoteBacklink.funk = Function('id', "return'" + format + "'");
|
||||
return g.callbacks.push(function(root) {
|
||||
var container, el, id, link, qid, quote, quotes, _i, _len, _ref, _results;
|
||||
var a, container, el, id, link, qid, quote, quotes, _i, _len, _ref, _results;
|
||||
if (root.classList.contains('inline')) {
|
||||
return;
|
||||
}
|
||||
id = $('input', root).name;
|
||||
quotes = {};
|
||||
_ref = $$('.quotelink', root);
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -2350,6 +2349,12 @@
|
||||
}
|
||||
quotes[qid] = quote;
|
||||
}
|
||||
id = $('input', root).name;
|
||||
a = $.el('a', {
|
||||
href: "#" + id,
|
||||
className: root.hidden ? 'filtered backlink' : 'backlink',
|
||||
textContent: quoteBacklink.funk(id)
|
||||
});
|
||||
_results = [];
|
||||
for (qid in quotes) {
|
||||
if (!(el = $.id(qid))) {
|
||||
@ -2358,11 +2363,7 @@
|
||||
if (!conf['OP Backlinks'] && el.className === 'op') {
|
||||
continue;
|
||||
}
|
||||
link = $.el('a', {
|
||||
href: "#" + id,
|
||||
className: root.hidden ? 'filtered backlink' : 'backlink',
|
||||
textContent: quoteBacklink.funk(id)
|
||||
});
|
||||
link = a.cloneNode(true);
|
||||
if (conf['Quote Preview']) {
|
||||
$.bind(link, 'mouseover', quotePreview.mouseover);
|
||||
$.bind(link, 'mousemove', ui.hover);
|
||||
|
||||
@ -1765,22 +1765,23 @@ quoteBacklink =
|
||||
quoteBacklink.funk = Function 'id', "return'#{format}'"
|
||||
g.callbacks.push (root) ->
|
||||
return if root.classList.contains 'inline'
|
||||
# op or reply
|
||||
id = $('input', root).name
|
||||
quotes = {}
|
||||
for quote in $$ '.quotelink', root
|
||||
#don't process >>>/b/
|
||||
continue unless qid = quote.hash[1..]
|
||||
#duplicate quotes get overwritten
|
||||
quotes[qid] = quote
|
||||
# op or reply
|
||||
id = $('input', root).name
|
||||
a = $.el 'a',
|
||||
href: "##{id}"
|
||||
className: if root.hidden then 'filtered backlink' else 'backlink'
|
||||
textContent: quoteBacklink.funk id
|
||||
for qid of quotes
|
||||
continue unless el = $.id qid
|
||||
#don't backlink the op
|
||||
continue if !conf['OP Backlinks'] and el.className is 'op'
|
||||
link = $.el 'a',
|
||||
href: "##{id}"
|
||||
className: if root.hidden then 'filtered backlink' else 'backlink'
|
||||
textContent: quoteBacklink.funk id
|
||||
link = a.cloneNode true
|
||||
if conf['Quote Preview']
|
||||
$.bind link, 'mouseover', quotePreview.mouseover
|
||||
$.bind link, 'mousemove', ui.hover
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user