Fix cross-thread quotes indicators after an OP quote. Derp.

This commit is contained in:
Nicolas Stepien 2012-02-27 01:52:38 +01:00
parent c5ea31dd2b
commit 674e8ab41b
2 changed files with 7 additions and 6 deletions

View File

@ -3320,13 +3320,13 @@
_ref = $$('.quotelink', root);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
quote = _ref[_i];
hash = quote.hash.slice(1);
if (!(hash = quote.hash.slice(1))) continue;
if (conf['Indicate OP quote'] && hash === tid) {
$.add(quote, $.tn('\u00A0(OP)'));
return;
continue;
}
path = quote.pathname;
if (conf['Indicate Cross-thread Quotes'] && hash && path.lastIndexOf("/" + tid) === -1 && path.indexOf("/" + g.BOARD + "/") === 0) {
if (conf['Indicate Cross-thread Quotes'] && path.lastIndexOf("/" + tid) === -1 && path.indexOf("/" + g.BOARD + "/") === 0) {
$.add(quote, $.tn('\u00A0(Cross-thread)'));
}
}

View File

@ -2674,14 +2674,15 @@ quoteIndicators =
# We use contains() so that it works with hidden threads
tid = g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]', root).firstChild.id
for quote in $$ '.quotelink', root
hash = quote.hash[1..]
unless hash = quote.hash[1..]
continue
if conf['Indicate OP quote'] and hash is tid
# \u00A0 is nbsp
$.add quote, $.tn '\u00A0(OP)'
return
continue
path = quote.pathname
#if quote leads to a different thread id and is located on the same board (index 0)
if conf['Indicate Cross-thread Quotes'] and hash and path.lastIndexOf("/#{tid}") is -1 and path.indexOf("/#{g.BOARD}/") is 0
if conf['Indicate Cross-thread Quotes'] and path.lastIndexOf("/#{tid}") is -1 and path.indexOf("/#{g.BOARD}/") is 0
# \u00A0 is nbsp
$.add quote, $.tn '\u00A0(Cross-thread)'
return