diff --git a/4chan_x.js b/4chan_x.js index b5184f4a1..379974efb 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -58,7 +58,7 @@ */ (function() { - var $, $$, Favicon, NAMESPACE, Recaptcha, anonymize, config, d, expandComment, expandThread, g, imageHover, imgExpand, imgGif, imgPreloading, keybinds, localize, log, main, nav, nodeInserted, options, qr, quickReport, quoteBacklink, quotePreview, redirect, replyHiding, sauce, threadHiding, threading, titlePost, ui, unread, updater, watcher, _config, _ref; + var $, $$, Favicon, NAMESPACE, Recaptcha, anonymize, config, d, expandComment, expandThread, g, imageHover, imgExpand, imgGif, imgPreloading, keybinds, localize, log, main, nav, nodeInserted, options, qr, quoteBacklink, quotePreview, redirect, replyHiding, reportButton, sauce, threadHiding, threading, titlePost, ui, unread, updater, watcher, _config, _ref; var __slice = Array.prototype.slice; if (typeof console !== "undefined" && console !== null) { log = function(arg) { @@ -83,10 +83,10 @@ 'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'], 'Post in Title': [true, 'Show the op\'s post in the tab title'], 'Quick Reply': [true, 'Reply without leaving the page'], - 'Quick Report': [true, 'Add quick report buttons'], 'Quote Backlinks': [false, 'Add quote backlinks'], 'Quote Preview': [false, 'Show quote content on hover'], 'Reply Hiding': [true, 'Hide single replies'], + 'Report Button': [true, 'Add Report Button buttons'], 'Sauce': [true, 'Add sauce to images'], 'Show Stubs': [true, 'Of hidden threads / replies'], 'Thread Expansion': [true, 'View all replies'], @@ -1789,24 +1789,24 @@ return qp.innerHTML = html; } }; - quickReport = { + reportButton = { init: function() { - return g.callbacks.push(quickReport.cb.node); + return g.callbacks.push(reportButton.cb.node); }, cb: { node: function(root) { var a, span; span = $('span[id^=no]', root); a = $.el('a', { - className: 'quickreport', + className: 'reportbutton', innerHTML: '[ ! ]' }); - $.bind(a, 'click', quickReport.cb.report); + $.bind(a, 'click', reportButton.cb.report); $.after(span, a); return $.after(span, $.tn(' ')); }, report: function(e) { - return quickReport.report(this); + return reportButton.report(this); } }, report: function(target) { @@ -2257,8 +2257,8 @@ if ($.config('Quick Reply')) { qr.init(); } - if ($.config('Quick Report')) { - quickReport.init(); + if ($.config('Report Button')) { + reportButton.init(); } if ($.config('Quote Backlinks')) { quoteBacklink.init(); diff --git a/script.coffee b/script.coffee index bd910af22..0b52621fc 100644 --- a/script.coffee +++ b/script.coffee @@ -27,10 +27,10 @@ config = 'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'] 'Post in Title': [true, 'Show the op\'s post in the tab title'] 'Quick Reply': [true, 'Reply without leaving the page'] - 'Quick Report': [true, 'Add quick report buttons'] 'Quote Backlinks': [false, 'Add quote backlinks'] 'Quote Preview': [false, 'Show quote content on hover'] 'Reply Hiding': [true, 'Hide single replies'] + 'Report Button': [true, 'Add Report Button buttons'] 'Sauce': [true, 'Add sauce to images'] 'Show Stubs': [true, 'Of hidden threads / replies'] 'Thread Expansion': [true, 'View all replies'] @@ -1419,20 +1419,20 @@ quotePreview = break qp.innerHTML = html -quickReport = +reportButton = init: -> - g.callbacks.push quickReport.cb.node + g.callbacks.push reportButton.cb.node cb: node: (root) -> span = $ 'span[id^=no]', root a = $.el 'a', - className: 'quickreport' + className: 'reportbutton' innerHTML: '[ ! ]' - $.bind a, 'click', quickReport.cb.report + $.bind a, 'click', reportButton.cb.report $.after span, a $.after span, $.tn(' ') report: (e) -> - quickReport.report this + reportButton.report this report: (target) -> input = $.x('preceding-sibling::input[1]', target) input.click() @@ -1761,8 +1761,8 @@ main = if $.config 'Quick Reply' qr.init() - if $.config 'Quick Report' - quickReport.init() + if $.config 'Report Button' + reportButton.init() if $.config 'Quote Backlinks' quoteBacklink.init()