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