Move class adding out of node
This commit is contained in:
parent
4004cc86d9
commit
55f817e32c
@ -4106,6 +4106,12 @@
|
||||
if (g.VIEW === 'catalog' || !Conf['Mark Quotes of You'] || !Conf['Quick Reply']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
$.addClass(doc, 'highlight-own');
|
||||
}
|
||||
if (Conf['Highlight Posts Quoting You']) {
|
||||
$.addClass(doc, 'highlight-you');
|
||||
}
|
||||
this.text = '\u00A0(You)';
|
||||
return Post.prototype.callbacks.push({
|
||||
name: 'Mark Quotes of You',
|
||||
@ -4121,12 +4127,6 @@
|
||||
if (this.info.yours) {
|
||||
$.addClass(this.nodes.root, 'yourPost');
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
$.addClass(doc, 'highlight-own');
|
||||
}
|
||||
if (Conf['Highlight Posts Quoting You']) {
|
||||
$.addClass(doc, 'highlight-you');
|
||||
}
|
||||
if (!(quotes = this.quotes).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -4102,6 +4102,12 @@
|
||||
if (g.VIEW === 'catalog' || !Conf['Mark Quotes of You'] || !Conf['Quick Reply']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
$.addClass(doc, 'highlight-own');
|
||||
}
|
||||
if (Conf['Highlight Posts Quoting You']) {
|
||||
$.addClass(doc, 'highlight-you');
|
||||
}
|
||||
this.text = '\u00A0(You)';
|
||||
return Post.prototype.callbacks.push({
|
||||
name: 'Mark Quotes of You',
|
||||
@ -4117,12 +4123,6 @@
|
||||
if (this.info.yours) {
|
||||
$.addClass(this.nodes.root, 'yourPost');
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
$.addClass(doc, 'highlight-own');
|
||||
}
|
||||
if (Conf['Highlight Posts Quoting You']) {
|
||||
$.addClass(doc, 'highlight-you');
|
||||
}
|
||||
if (!(quotes = this.quotes).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -4105,6 +4105,12 @@
|
||||
if (g.VIEW === 'catalog' || !Conf['Mark Quotes of You'] || !Conf['Quick Reply']) {
|
||||
return;
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
$.addClass(doc, 'highlight-own');
|
||||
}
|
||||
if (Conf['Highlight Posts Quoting You']) {
|
||||
$.addClass(doc, 'highlight-you');
|
||||
}
|
||||
this.text = '\u00A0(You)';
|
||||
return Post.prototype.callbacks.push({
|
||||
name: 'Mark Quotes of You',
|
||||
@ -4120,12 +4126,6 @@
|
||||
if (this.info.yours) {
|
||||
$.addClass(this.nodes.root, 'yourPost');
|
||||
}
|
||||
if (Conf['Highlight Own Posts']) {
|
||||
$.addClass(doc, 'highlight-own');
|
||||
}
|
||||
if (Conf['Highlight Posts Quoting You']) {
|
||||
$.addClass(doc, 'highlight-you');
|
||||
}
|
||||
if (!(quotes = this.quotes).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2,6 +2,12 @@ QuoteYou =
|
||||
init: ->
|
||||
return if g.VIEW is 'catalog' or !Conf['Mark Quotes of You'] or !Conf['Quick Reply']
|
||||
|
||||
if Conf['Highlight Own Posts']
|
||||
$.addClass doc, 'highlight-own'
|
||||
|
||||
if Conf['Highlight Posts Quoting You']
|
||||
$.addClass doc, 'highlight-you'
|
||||
|
||||
# \u00A0 is nbsp
|
||||
@text = '\u00A0(You)'
|
||||
Post::callbacks.push
|
||||
@ -14,12 +20,6 @@ QuoteYou =
|
||||
if @info.yours
|
||||
$.addClass @nodes.root, 'yourPost'
|
||||
|
||||
if Conf['Highlight Own Posts']
|
||||
$.addClass doc, 'highlight-own'
|
||||
|
||||
if Conf['Highlight Posts Quoting You']
|
||||
$.addClass doc, 'highlight-you'
|
||||
|
||||
# Stop there if there's no quotes in that post.
|
||||
return unless (quotes = @quotes).length
|
||||
{quotelinks} = @nodes
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user