Add custom highlight classes to quote previews. Close #491.
This commit is contained in:
parent
47c517efb1
commit
9956d337c2
@ -3192,11 +3192,12 @@
|
||||
}
|
||||
qp = UI.el = $.el('div', {
|
||||
id: 'qp',
|
||||
className: 'reply dialog post'
|
||||
className: 'post reply dialog'
|
||||
});
|
||||
$.add(d.body, qp);
|
||||
id = this.hash.slice(2);
|
||||
if (el = $.id("p" + id)) {
|
||||
qp.className += el.parentNode.className.replace(/^.+(op|reply)Container/, '');
|
||||
qp.innerHTML = el.innerHTML;
|
||||
if (Conf['Quote Highlighting']) {
|
||||
if (/\bop\b/.test(el.className)) {
|
||||
@ -3218,8 +3219,8 @@
|
||||
$.cache(this.pathname, function() {
|
||||
return QuotePreview.parse(this, id);
|
||||
});
|
||||
UI.hover(e);
|
||||
}
|
||||
UI.hover(e);
|
||||
$.on(this, 'mousemove', UI.hover);
|
||||
return $.on(this, 'mouseout click', QuotePreview.mouseout);
|
||||
},
|
||||
|
||||
@ -2424,12 +2424,13 @@ QuotePreview =
|
||||
return if /\binlined\b/.test @className
|
||||
qp = UI.el = $.el 'div',
|
||||
id: 'qp'
|
||||
className: 'reply dialog post'
|
||||
className: 'post reply dialog'
|
||||
$.add d.body, qp
|
||||
|
||||
id = @hash[2..]
|
||||
if el = $.id "p#{id}"
|
||||
qp.innerHTML = el.innerHTML
|
||||
qp.className += el.parentNode.className.replace /^.+(op|reply)Container/, ''
|
||||
qp.innerHTML = el.innerHTML
|
||||
if Conf['Quote Highlighting']
|
||||
if /\bop\b/.test el.className
|
||||
$.addClass el.parentNode, 'qphl'
|
||||
@ -2442,7 +2443,7 @@ QuotePreview =
|
||||
else
|
||||
qp.textContent = "Loading #{id}..."
|
||||
$.cache @pathname, -> QuotePreview.parse @, id
|
||||
UI.hover e
|
||||
UI.hover e
|
||||
$.on @, 'mousemove', UI.hover
|
||||
$.on @, 'mouseout click', QuotePreview.mouseout
|
||||
mouseout: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user