Fix time traveling backlinks.

This commit is contained in:
Nicolas Stepien 2011-06-20 16:17:49 +02:00
parent b8b53efa4a
commit 350db1f73a
2 changed files with 20 additions and 7 deletions

View File

@ -1820,6 +1820,14 @@
};
quoteBacklink = {
init: function() {
var span, _i, _len, _ref;
_ref = $$('span[id^=no]');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
span = _ref[_i];
$.after(span, $.el('span', {
className: 'container'
}));
}
return g.callbacks.push(quoteBacklink.node);
},
node: function(root) {
@ -1827,10 +1835,12 @@
if (/inline/.test(root.className)) {
return;
}
container = $.el('span', {
className: 'container'
});
$.after($('span[id^=no]', root), container);
if (!$('.container', root)) {
container = $.el('span', {
className: 'container'
});
$.after($('span[id^=no]', root), container);
}
id = root.id || $('td[id]', root).id;
quotes = {};
opbl = $.config('OP Backlinks');

View File

@ -1437,12 +1437,15 @@ titlePost =
quoteBacklink =
init: ->
for span in $$('span[id^=no]')
$.after span, $.el 'span', className: 'container'
g.callbacks.push quoteBacklink.node
node: (root) ->
return if /inline/.test root.className
container = $.el 'span',
className: 'container'
$.after $('span[id^=no]', root), container
unless $ '.container', root
container = $.el 'span',
className: 'container'
$.after $('span[id^=no]', root), container
id = root.id or $('td[id]', root).id
quotes = {}
opbl = $.config 'OP Backlinks'