From 3283e38cd9069d393482bc9b02a0fafbfa98c61c Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 10 May 2013 01:34:30 -0700 Subject: [PATCH] Remove some good practices... if we weren't using CoffeeScript --- builds/4chan-X.js | 5 ++--- builds/4chan-X.user.js | 5 ++--- builds/crx/script.js | 5 ++--- src/Quotelinks/QuoteYou.coffee | 4 ++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 88b3c7ef7..34d4ca5e4 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -4125,8 +4125,7 @@ if (Conf['Highlight Posts Quoting You']) { $.addClass(doc, 'highlight-you'); } - this.text = '\u00A0(You)'; - return Post.prototype.callbacks.push({ + return this.text = Post.prototype.callbacks.push({ name: 'Mark Quotes of You', cb: this.node }); @@ -4147,7 +4146,7 @@ for (_i = 0, _len = quotelinks.length; _i < _len; _i++) { quotelink = quotelinks[_i]; if (QR.db.get(Get.postDataFromLink(quotelink))) { - $.add(quotelink, $.tn(QuoteYou.text)); + $.add(quotelink, $.tn('\u00A0(You)')); $.addClass(this.nodes.root, 'quotesYou'); } } diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index ec6ecae38..dd27c7f61 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4109,8 +4109,7 @@ if (Conf['Highlight Posts Quoting You']) { $.addClass(doc, 'highlight-you'); } - this.text = '\u00A0(You)'; - return Post.prototype.callbacks.push({ + return this.text = Post.prototype.callbacks.push({ name: 'Mark Quotes of You', cb: this.node }); @@ -4131,7 +4130,7 @@ for (_i = 0, _len = quotelinks.length; _i < _len; _i++) { quotelink = quotelinks[_i]; if (QR.db.get(Get.postDataFromLink(quotelink))) { - $.add(quotelink, $.tn(QuoteYou.text)); + $.add(quotelink, $.tn('\u00A0(You)')); $.addClass(this.nodes.root, 'quotesYou'); } } diff --git a/builds/crx/script.js b/builds/crx/script.js index 92a6ef8c8..1e9ce43b6 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4111,8 +4111,7 @@ if (Conf['Highlight Posts Quoting You']) { $.addClass(doc, 'highlight-you'); } - this.text = '\u00A0(You)'; - return Post.prototype.callbacks.push({ + return this.text = Post.prototype.callbacks.push({ name: 'Mark Quotes of You', cb: this.node }); @@ -4133,7 +4132,7 @@ for (_i = 0, _len = quotelinks.length; _i < _len; _i++) { quotelink = quotelinks[_i]; if (QR.db.get(Get.postDataFromLink(quotelink))) { - $.add(quotelink, $.tn(QuoteYou.text)); + $.add(quotelink, $.tn('\u00A0(You)')); $.addClass(this.nodes.root, 'quotesYou'); } } diff --git a/src/Quotelinks/QuoteYou.coffee b/src/Quotelinks/QuoteYou.coffee index ff37044cd..15b64b48e 100644 --- a/src/Quotelinks/QuoteYou.coffee +++ b/src/Quotelinks/QuoteYou.coffee @@ -9,7 +9,7 @@ QuoteYou = $.addClass doc, 'highlight-you' # \u00A0 is nbsp - @text = '\u00A0(You)' + @text = Post::callbacks.push name: 'Mark Quotes of You' cb: @node @@ -26,6 +26,6 @@ QuoteYou = for quotelink in quotelinks if QR.db.get Get.postDataFromLink quotelink - $.add quotelink, $.tn QuoteYou.text + $.add quotelink, $.tn '\u00A0(You)' $.addClass @nodes.root, 'quotesYou' return \ No newline at end of file