From 1470c0e563a1da7cf599a290a5efd470ec6481b5 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 9 Aug 2013 20:19:08 -0700 Subject: [PATCH] More oops --- builds/4chan-X.user.js | 8 +++++--- builds/crx/script.js | 8 +++++--- src/Filtering/ThreadHiding.coffee | 2 +- src/Quotelinks/QuoteYou.coffee | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 2f997141e..cd8261e6b 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -3487,7 +3487,7 @@ textContent: 'Show thread', href: 'javascript:;' }); - $.on(show, 'click', ThreadHiding.menu.show); + $.on(div, 'click', ThreadHiding.menu.show); $.event('AddMenuEntry', { type: 'post' }); @@ -4223,12 +4223,14 @@ }, cb: { seek: function(type) { - var post, posts, result, str; + var highlight, post, posts, result, str; if (!(Conf['Mark Quotes of You'] && Conf['Quick Reply'])) { return; } - $.rmClass($('.highlight'), 'highlight'); + if (highlight = $('.highlight')) { + $.rmClass(highlight, 'highlight'); + } if (!QuoteYou.lastRead) { if (!(post = QuoteYou.lastRead = $('.quotesYou'))) { new Notification('warning', 'No posts are currently quoting you, loser.', 20); diff --git a/builds/crx/script.js b/builds/crx/script.js index 787755dde..0dff7e082 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -3492,7 +3492,7 @@ textContent: 'Show thread', href: 'javascript:;' }); - $.on(show, 'click', ThreadHiding.menu.show); + $.on(div, 'click', ThreadHiding.menu.show); $.event('AddMenuEntry', { type: 'post' }); @@ -4228,12 +4228,14 @@ }, cb: { seek: function(type) { - var post, posts, result, str; + var highlight, post, posts, result, str; if (!(Conf['Mark Quotes of You'] && Conf['Quick Reply'])) { return; } - $.rmClass($('.highlight'), 'highlight'); + if (highlight = $('.highlight')) { + $.rmClass(highlight, 'highlight'); + } if (!QuoteYou.lastRead) { if (!(post = QuoteYou.lastRead = $('.quotesYou'))) { new Notification('warning', 'No posts are currently quoting you, loser.', 20); diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee index f193afbde..724210f6d 100644 --- a/src/Filtering/ThreadHiding.coffee +++ b/src/Filtering/ThreadHiding.coffee @@ -86,7 +86,7 @@ ThreadHiding = className: 'show-thread-link' textContent: 'Show thread' href: 'javascript:;' - $.on show, 'click', ThreadHiding.menu.show + $.on div, 'click', ThreadHiding.menu.show $.event 'AddMenuEntry', type: 'post' diff --git a/src/Quotelinks/QuoteYou.coffee b/src/Quotelinks/QuoteYou.coffee index 985940041..949ac8c84 100644 --- a/src/Quotelinks/QuoteYou.coffee +++ b/src/Quotelinks/QuoteYou.coffee @@ -34,7 +34,7 @@ QuoteYou = cb: seek: (type) -> return unless Conf['Mark Quotes of You'] and Conf['Quick Reply'] - $.rmClass $('.highlight'), 'highlight' + $.rmClass highlight, 'highlight' if highlight = $ '.highlight' unless QuoteYou.lastRead unless post = QuoteYou.lastRead = $ '.quotesYou'