Fix Quote Hash Navigation on Backlinks (again)
This commit is contained in:
parent
bc15231170
commit
7bc8447d3f
@ -5263,6 +5263,9 @@
|
||||
}
|
||||
if (Conf['Quote Inlining']) {
|
||||
$.on(a, 'click', QuoteInline.toggle);
|
||||
if (Conf['Quote Hash Navigation']) {
|
||||
QuoteInline.qiQuote(a, quoter.isHidden);
|
||||
}
|
||||
}
|
||||
return frag;
|
||||
}
|
||||
@ -5274,10 +5277,11 @@
|
||||
return;
|
||||
}
|
||||
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
|
||||
if (!clone) {
|
||||
$.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
|
||||
$.on(link, 'click', QuoteInline.toggle);
|
||||
if (clone) {
|
||||
return;
|
||||
}
|
||||
return $.on(link, 'click', QuoteInline.toggle);
|
||||
return QuoteInline.qiQuote(link, $.hasClass(link, 'filtered'));
|
||||
} : function(link) {
|
||||
return $.on(link, 'click', QuoteInline.toggle);
|
||||
};
|
||||
@ -5310,11 +5314,11 @@
|
||||
if (hidden) {
|
||||
name += "filtered";
|
||||
}
|
||||
return $.el('a', {
|
||||
return $.after(link, $.el('a', {
|
||||
className: name,
|
||||
textContent: '#',
|
||||
href: link.href
|
||||
});
|
||||
}));
|
||||
},
|
||||
toggle: function(e) {
|
||||
var boardID, context, postID, threadID, _ref;
|
||||
|
||||
@ -5315,6 +5315,9 @@
|
||||
}
|
||||
if (Conf['Quote Inlining']) {
|
||||
$.on(a, 'click', QuoteInline.toggle);
|
||||
if (Conf['Quote Hash Navigation']) {
|
||||
QuoteInline.qiQuote(a, quoter.isHidden);
|
||||
}
|
||||
}
|
||||
return frag;
|
||||
}
|
||||
@ -5326,10 +5329,11 @@
|
||||
return;
|
||||
}
|
||||
this.process = Conf['Quote Hash Navigation'] ? function(link, clone) {
|
||||
if (!clone) {
|
||||
$.after(link, QuoteInline.qiQuote(link, $.hasClass(link, 'filtered')));
|
||||
$.on(link, 'click', QuoteInline.toggle);
|
||||
if (clone) {
|
||||
return;
|
||||
}
|
||||
return $.on(link, 'click', QuoteInline.toggle);
|
||||
return QuoteInline.qiQuote(link, $.hasClass(link, 'filtered'));
|
||||
} : function(link) {
|
||||
return $.on(link, 'click', QuoteInline.toggle);
|
||||
};
|
||||
@ -5362,11 +5366,11 @@
|
||||
if (hidden) {
|
||||
name += "filtered";
|
||||
}
|
||||
return $.el('a', {
|
||||
return $.after(link, $.el('a', {
|
||||
className: name,
|
||||
textContent: '#',
|
||||
href: link.href
|
||||
});
|
||||
}));
|
||||
},
|
||||
toggle: function(e) {
|
||||
var boardID, context, postID, threadID, _ref;
|
||||
|
||||
@ -69,4 +69,6 @@ QuoteBacklink =
|
||||
$.on a, 'mouseover', QuotePreview.mouseover
|
||||
if Conf['Quote Inlining']
|
||||
$.on a, 'click', QuoteInline.toggle
|
||||
if Conf['Quote Hash Navigation']
|
||||
QuoteInline.qiQuote a, quoter.isHidden
|
||||
frag
|
||||
|
||||
@ -4,8 +4,9 @@ QuoteInline =
|
||||
|
||||
@process = if Conf['Quote Hash Navigation']
|
||||
(link, clone) ->
|
||||
$.after link, QuoteInline.qiQuote link, $.hasClass link, 'filtered' unless clone
|
||||
$.on link, 'click', QuoteInline.toggle
|
||||
return if clone
|
||||
QuoteInline.qiQuote link, $.hasClass link, 'filtered'
|
||||
|
||||
else
|
||||
(link) ->
|
||||
@ -28,7 +29,7 @@ QuoteInline =
|
||||
qiQuote: (link, hidden) ->
|
||||
name = "hashlink"
|
||||
name += "filtered" if hidden
|
||||
$.el 'a',
|
||||
$.after link, $.el 'a',
|
||||
className: name
|
||||
textContent: '#'
|
||||
href: link.href
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user