More autism-friendly. Please think of the autists.

This commit is contained in:
Nicolas Stepien 2011-05-12 23:35:08 +02:00
parent b6eb95f3db
commit 02bb7ce980
2 changed files with 17 additions and 17 deletions

View File

@ -58,7 +58,7 @@
*/ */
(function() { (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; var __slice = Array.prototype.slice;
if (typeof console !== "undefined" && console !== null) { if (typeof console !== "undefined" && console !== null) {
log = function(arg) { log = function(arg) {
@ -83,10 +83,10 @@
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'], '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'], 'Post in Title': [true, 'Show the op\'s post in the tab title'],
'Quick Reply': [true, 'Reply without leaving the page'], 'Quick Reply': [true, 'Reply without leaving the page'],
'Quick Report': [true, 'Add quick report buttons'],
'Quote Backlinks': [false, 'Add quote backlinks'], 'Quote Backlinks': [false, 'Add quote backlinks'],
'Quote Preview': [false, 'Show quote content on hover'], 'Quote Preview': [false, 'Show quote content on hover'],
'Reply Hiding': [true, 'Hide single replies'], 'Reply Hiding': [true, 'Hide single replies'],
'Report Button': [true, 'Add Report Button buttons'],
'Sauce': [true, 'Add sauce to images'], 'Sauce': [true, 'Add sauce to images'],
'Show Stubs': [true, 'Of hidden threads / replies'], 'Show Stubs': [true, 'Of hidden threads / replies'],
'Thread Expansion': [true, 'View all replies'], 'Thread Expansion': [true, 'View all replies'],
@ -1789,24 +1789,24 @@
return qp.innerHTML = html; return qp.innerHTML = html;
} }
}; };
quickReport = { reportButton = {
init: function() { init: function() {
return g.callbacks.push(quickReport.cb.node); return g.callbacks.push(reportButton.cb.node);
}, },
cb: { cb: {
node: function(root) { node: function(root) {
var a, span; var a, span;
span = $('span[id^=no]', root); span = $('span[id^=no]', root);
a = $.el('a', { a = $.el('a', {
className: 'quickreport', className: 'reportbutton',
innerHTML: '[ ! ]' innerHTML: '[ ! ]'
}); });
$.bind(a, 'click', quickReport.cb.report); $.bind(a, 'click', reportButton.cb.report);
$.after(span, a); $.after(span, a);
return $.after(span, $.tn(' ')); return $.after(span, $.tn(' '));
}, },
report: function(e) { report: function(e) {
return quickReport.report(this); return reportButton.report(this);
} }
}, },
report: function(target) { report: function(target) {
@ -2257,8 +2257,8 @@
if ($.config('Quick Reply')) { if ($.config('Quick Reply')) {
qr.init(); qr.init();
} }
if ($.config('Quick Report')) { if ($.config('Report Button')) {
quickReport.init(); reportButton.init();
} }
if ($.config('Quote Backlinks')) { if ($.config('Quote Backlinks')) {
quoteBacklink.init(); quoteBacklink.init();

View File

@ -27,10 +27,10 @@ config =
'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'] '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'] 'Post in Title': [true, 'Show the op\'s post in the tab title']
'Quick Reply': [true, 'Reply without leaving the page'] 'Quick Reply': [true, 'Reply without leaving the page']
'Quick Report': [true, 'Add quick report buttons']
'Quote Backlinks': [false, 'Add quote backlinks'] 'Quote Backlinks': [false, 'Add quote backlinks']
'Quote Preview': [false, 'Show quote content on hover'] 'Quote Preview': [false, 'Show quote content on hover']
'Reply Hiding': [true, 'Hide single replies'] 'Reply Hiding': [true, 'Hide single replies']
'Report Button': [true, 'Add Report Button buttons']
'Sauce': [true, 'Add sauce to images'] 'Sauce': [true, 'Add sauce to images']
'Show Stubs': [true, 'Of hidden threads / replies'] 'Show Stubs': [true, 'Of hidden threads / replies']
'Thread Expansion': [true, 'View all replies'] 'Thread Expansion': [true, 'View all replies']
@ -1419,20 +1419,20 @@ quotePreview =
break break
qp.innerHTML = html qp.innerHTML = html
quickReport = reportButton =
init: -> init: ->
g.callbacks.push quickReport.cb.node g.callbacks.push reportButton.cb.node
cb: cb:
node: (root) -> node: (root) ->
span = $ 'span[id^=no]', root span = $ 'span[id^=no]', root
a = $.el 'a', a = $.el 'a',
className: 'quickreport' className: 'reportbutton'
innerHTML: '[ ! ]' innerHTML: '[ ! ]'
$.bind a, 'click', quickReport.cb.report $.bind a, 'click', reportButton.cb.report
$.after span, a $.after span, a
$.after span, $.tn(' ') $.after span, $.tn(' ')
report: (e) -> report: (e) ->
quickReport.report this reportButton.report this
report: (target) -> report: (target) ->
input = $.x('preceding-sibling::input[1]', target) input = $.x('preceding-sibling::input[1]', target)
input.click() input.click()
@ -1761,8 +1761,8 @@ main =
if $.config 'Quick Reply' if $.config 'Quick Reply'
qr.init() qr.init()
if $.config 'Quick Report' if $.config 'Report Button'
quickReport.init() reportButton.init()
if $.config 'Quote Backlinks' if $.config 'Quote Backlinks'
quoteBacklink.init() quoteBacklink.init()