XXXs are gone.

This commit is contained in:
Nicolas Stepien 2012-02-27 02:10:15 +01:00
parent cc71307ad6
commit f7d17467b8
2 changed files with 1 additions and 46 deletions

View File

@ -72,13 +72,12 @@
*/
(function() {
var $, $$, DAY, Favicon, FileInfo, HOUR, MINUTE, Main, NAMESPACE, SECOND, Time, VERSION, anonymize, conf, config, d, engine, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteIndicators, quoteInline, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, unxify, updater, val, watcher, _base;
var $, $$, DAY, Favicon, FileInfo, HOUR, MINUTE, Main, NAMESPACE, SECOND, Time, VERSION, anonymize, conf, config, d, engine, expandComment, expandThread, filter, flatten, g, getTitle, imgExpand, imgGif, imgHover, key, keybinds, log, nav, options, qr, quoteBacklink, quoteIndicators, quoteInline, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, strikethroughQuotes, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher, _base;
config = {
main: {
Enhancing: {
'404 Redirect': [true, 'Redirect dead threads and images'],
'Fix XXX\'d Post Numbers': [true, 'Replace XXX\'d post numbers with their actual number'],
'Keybinds': [true, 'Binds actions to keys'],
'Time Formatting': [true, 'Arbitrarily formatted timestamps, using your local time'],
'File Info Formatting': [true, 'Reformats the file information'],
@ -1242,27 +1241,6 @@
}
};
unxify = {
init: function() {
return g.callbacks.push(this.node);
},
node: function(root) {
var number, quote;
switch (unxify.censor) {
case true:
quote = $('.quotejs + .quotejs', root);
return quote.textContent = quote.previousElementSibling.hash.slice(1);
case false:
break;
default:
number = $('.quotejs + .quotejs', root).textContent;
if (number.length < 4) return;
unxify.censor = /\D/.test($('.quotejs + .quotejs', root).textContent);
return unxify.node(root);
}
}
};
qr = {
init: function() {
var form, iframe, link, loadChecking, script;
@ -3814,7 +3792,6 @@
if (conf['Indicate OP quote'] || conf['Indicate Cross-thread Quotes']) {
quoteIndicators.init();
}
if (conf['Fix XXX\'d Post Numbers']) unxify.init();
return $.ready(Main.ready);
},
ready: function() {

View File

@ -2,7 +2,6 @@ config =
main:
Enhancing:
'404 Redirect': [true, 'Redirect dead threads and images']
'Fix XXX\'d Post Numbers': [true, 'Replace XXX\'d post numbers with their actual number']
'Keybinds': [true, 'Binds actions to keys']
'Time Formatting': [true, 'Arbitrarily formatted timestamps, using your local time']
'File Info Formatting': [true, 'Reformats the file information']
@ -984,24 +983,6 @@ nav =
{top} = nav.threads[i]?.getBoundingClientRect()
window.scrollBy 0, top
unxify =
init: ->
g.callbacks.push @node
node: (root) ->
switch unxify.censor
when true
quote = $ '.quotejs + .quotejs', root
quote.textContent = quote.previousElementSibling.hash[1..]
when false
# Don't execute on safe boards.
else
number = $('.quotejs + .quotejs', root).textContent
# 3 digits long post numbers are not censored.
return if number.length < 4
# Test if the board's censored.
unxify.censor = /\D/.test $('.quotejs + .quotejs', root).textContent
unxify.node root
qr =
init: ->
return unless $.id 'recaptcha_challenge_field_holder'
@ -3094,9 +3075,6 @@ Main =
if conf['Indicate OP quote'] or conf['Indicate Cross-thread Quotes']
quoteIndicators.init()
if conf['Fix XXX\'d Post Numbers']
unxify.init()
$.ready Main.ready
ready: ->