hash[1..]

This commit is contained in:
James Campos 2011-05-14 10:57:26 -07:00
parent 4767e98271
commit 81280dd548
2 changed files with 4 additions and 8 deletions

View File

@ -1667,10 +1667,9 @@
_ref = $$('a.quotelink', root);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
quote = _ref[_i];
if (!(qid = quote.textContent.match(/\d+/))) {
if (!(qid = quote.hash.slice(1))) {
continue;
}
qid = qid[0];
if (qid === tid) {
continue;
}
@ -1800,10 +1799,9 @@
},
mouseover: function(e) {
var el, id, qp, req, threadID;
if (!(id = this.textContent.match(/\d+/))) {
if (!(id = this.hash.slice(1))) {
return;
}
id = id[0];
qp = $('#qp');
if (el = d.getElementById(id)) {
qp.innerHTML = el.innerHTML;

View File

@ -1337,8 +1337,7 @@ quoteBacklink =
quotes = {}
tid = g.THREAD_ID
for quote in $$ 'a.quotelink', root
continue unless qid = quote.textContent.match /\d+/
[qid] = qid
continue unless qid = quote.hash[1..]
#don't backlink the op
continue if qid == tid
#duplicate quotes get overwritten
@ -1424,8 +1423,7 @@ quotePreview =
$.bind quote, 'mousemove', ui.hover
$.bind quote, 'mouseout', ui.hoverend
mouseover: (e) ->
return unless id = @textContent.match /\d+/
[id] = id
return unless id = @hash[1..]
qp = $ '#qp'
if el = d.getElementById id
qp.innerHTML = el.innerHTML