diff --git a/4chan_x.user.js b/4chan_x.user.js index 4eed52eb7..c42034b81 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -77,7 +77,7 @@ */ (function() { - var $, $$, Anonymize, AutoGif, Conf, Config, DeleteButton, ExpandComment, ExpandThread, Favicon, FileInfo, Filter, Get, ImageExpand, ImageHover, Keybinds, Main, Menu, Nav, Options, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, Quotify, Redirect, ReplyHiding, ReportButton, RevealSpoilers, Sauce, StrikethroughQuotes, ThreadHiding, ThreadStats, Time, TitlePost, UI, Unread, Updater, Watcher, d, g, _base; + var $, $$, Anonymize, AutoGif, Conf, Config, DeleteButton, ExpandComment, ExpandThread, Favicon, FileInfo, Filter, Get, ImageExpand, ImageHover, Keybinds, Main, Menu, Nav, Options, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, Quotify, Redirect, ReplyHiding, ReportLink, RevealSpoilers, Sauce, StrikethroughQuotes, ThreadHiding, ThreadStats, Time, TitlePost, UI, Unread, Updater, Watcher, d, g, _base; Config = { main: { @@ -3863,14 +3863,14 @@ } }; - ReportButton = { + ReportLink = { init: function() { var a; a = Menu.newEntry('a'); a.href = 'javascript:;'; a.textContent = 'Report this post'; - $.addClass(a, 'report_button'); - $.on(a, 'click', ReportButton.report); + $.addClass(a, 'report_link'); + $.on(a, 'click', this.report); return Menu.entries.push({ el: a, requirements: { @@ -4530,8 +4530,8 @@ if (Conf['Image Hover']) { ImageHover.init(); } - if (Conf['Report Button']) { - ReportButton.init(); + if (Conf['Report Link']) { + ReportLink.init(); } if (Conf['Delete Button']) { DeleteButton.init(); diff --git a/script.coffee b/script.coffee index 6aea157b7..7e900ef64 100644 --- a/script.coffee +++ b/script.coffee @@ -3032,13 +3032,13 @@ DeleteButton = self.innerHTML = '[ Connection error, please retry. ]' $.on self, 'click', DeleteButton.delete -ReportButton = +ReportLink = init: -> a = Menu.newEntry 'a' a.href = 'javascript:;' a.textContent = 'Report this post' - $.addClass a, 'report_button' - $.on a, 'click', ReportButton.report + $.addClass a, 'report_link' + $.on a, 'click', @report Menu.entries.push el: a requirements: @@ -3526,8 +3526,8 @@ Main = if Conf['Image Hover'] ImageHover.init() - if Conf['Report Button'] - ReportButton.init() + if Conf['Report Link'] + ReportLink.init() if Conf['Delete Button'] DeleteButton.init()