Revert "fix quoting"
This reverts commit d8f13d1129821e01ab53be196e442d8eecc1f8de.
This commit is contained in:
parent
31a5f5e8a5
commit
ba27209007
@ -1731,8 +1731,7 @@
|
|||||||
_ref = $$('a.quotelink', root);
|
_ref = $$('a.quotelink', root);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
quote = _ref[_i];
|
quote = _ref[_i];
|
||||||
qid = quote.hash.slice(1) || quote.getAttribute('data-href').match(/\d+$/)[0];
|
if (!(qid = quote.hash.slice(1))) {
|
||||||
if (!qid) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!opbl && qid === tid) {
|
if (!opbl && qid === tid) {
|
||||||
@ -1775,7 +1774,7 @@
|
|||||||
_results = [];
|
_results = [];
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
quote = _ref[_i];
|
quote = _ref[_i];
|
||||||
if (!(quote.hash || quote.getAttribute('data-href'))) {
|
if (!quote.hash) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
quote.removeAttribute('onclick');
|
quote.removeAttribute('onclick');
|
||||||
@ -1877,13 +1876,11 @@
|
|||||||
_results = [];
|
_results = [];
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
quote = _ref[_i];
|
quote = _ref[_i];
|
||||||
if (!(quote.hash || quote.getAttribute('data-href'))) {
|
if (!quote.hash) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (quote.href) {
|
quote.setAttribute('data-href', quote.href);
|
||||||
quote.setAttribute('data-href', quote.href);
|
quote.removeAttribute('href');
|
||||||
quote.removeAttribute('href');
|
|
||||||
}
|
|
||||||
$.bind(quote, 'mouseover', quotePreview.mouseover);
|
$.bind(quote, 'mouseover', quotePreview.mouseover);
|
||||||
$.bind(quote, 'mousemove', ui.hover);
|
$.bind(quote, 'mousemove', ui.hover);
|
||||||
$.bind(quote, 'mouseout', ui.hoverend);
|
$.bind(quote, 'mouseout', ui.hoverend);
|
||||||
@ -1914,7 +1911,7 @@
|
|||||||
_ref2 = $$('a.quotelink', qp);
|
_ref2 = $$('a.quotelink', qp);
|
||||||
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
||||||
quote = _ref2[_i];
|
quote = _ref2[_i];
|
||||||
if (quote.getAttribute('data-href').match(/\d+$/)[0] === replyID) {
|
if (quote.hash.slice(1) === replyID) {
|
||||||
quote.className = 'forwardlink';
|
quote.className = 'forwardlink';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1963,7 +1960,7 @@
|
|||||||
return g.callbacks.push(quoteOP.node);
|
return g.callbacks.push(quoteOP.node);
|
||||||
},
|
},
|
||||||
node: function(root) {
|
node: function(root) {
|
||||||
var qid, quote, tid, _i, _len, _ref, _results;
|
var quote, tid, _i, _len, _ref, _results;
|
||||||
if (root.className === 'inline') {
|
if (root.className === 'inline') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1972,8 +1969,7 @@
|
|||||||
_results = [];
|
_results = [];
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
quote = _ref[_i];
|
quote = _ref[_i];
|
||||||
qid = quote.hash.slice(1) || quote.getAttribute('data-href').match(/\d+/)[0];
|
_results.push(quote.hash.slice(1) === tid ? quote.innerHTML += ' (OP)' : void 0);
|
||||||
_results.push(qid === tid ? quote.innerHTML += ' (OP)' : void 0);
|
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
}
|
}
|
||||||
@ -2563,7 +2559,7 @@
|
|||||||
cursor: pointer;\
|
cursor: pointer;\
|
||||||
}\
|
}\
|
||||||
\
|
\
|
||||||
.backlink, .quotelink, .forwardlink {\
|
.backlink, .quotelink {\
|
||||||
text-decoration: underline;\
|
text-decoration: underline;\
|
||||||
}\
|
}\
|
||||||
.new {\
|
.new {\
|
||||||
|
|||||||
@ -1387,8 +1387,7 @@ quoteBacklink =
|
|||||||
tid = g.THREAD_ID or root.parentNode.firstChild.id
|
tid = g.THREAD_ID or root.parentNode.firstChild.id
|
||||||
opbl = $.config 'OP Backlinks'
|
opbl = $.config 'OP Backlinks'
|
||||||
for quote in $$ 'a.quotelink', root
|
for quote in $$ 'a.quotelink', root
|
||||||
qid = quote.hash[1..] or quote.getAttribute('data-href').match(/\d+$/)[0]
|
continue unless qid = quote.hash[1..]
|
||||||
continue unless qid
|
|
||||||
#don't backlink the op
|
#don't backlink the op
|
||||||
continue if !opbl and qid is tid
|
continue if !opbl and qid is tid
|
||||||
#duplicate quotes get overwritten
|
#duplicate quotes get overwritten
|
||||||
@ -1413,7 +1412,7 @@ quoteInline =
|
|||||||
g.callbacks.push quoteInline.node
|
g.callbacks.push quoteInline.node
|
||||||
node: (root) ->
|
node: (root) ->
|
||||||
for quote in $$ 'a.quotelink, a.backlink', root
|
for quote in $$ 'a.quotelink, a.backlink', root
|
||||||
continue unless quote.hash or quote.getAttribute 'data-href'
|
continue unless quote.hash
|
||||||
quote.removeAttribute 'onclick'
|
quote.removeAttribute 'onclick'
|
||||||
$.bind quote, 'click', quoteInline.toggle
|
$.bind quote, 'click', quoteInline.toggle
|
||||||
toggle: (e) ->
|
toggle: (e) ->
|
||||||
@ -1480,12 +1479,11 @@ quotePreview =
|
|||||||
$.append d.body, preview
|
$.append d.body, preview
|
||||||
node: (root) ->
|
node: (root) ->
|
||||||
for quote in $$ 'a.quotelink, a.backlink', root
|
for quote in $$ 'a.quotelink, a.backlink', root
|
||||||
continue unless quote.hash or quote.getAttribute 'data-href'
|
continue unless quote.hash
|
||||||
if quote.href
|
# XXX dataset requires firefox 6.0+
|
||||||
# XXX dataset requires firefox 6.0+
|
# quote.dataset.href = quote.href
|
||||||
# quote.dataset.href = quote.href
|
quote.setAttribute 'data-href', quote.href
|
||||||
quote.setAttribute 'data-href', quote.href
|
quote.removeAttribute 'href'
|
||||||
quote.removeAttribute 'href'
|
|
||||||
$.bind quote, 'mouseover', quotePreview.mouseover
|
$.bind quote, 'mouseover', quotePreview.mouseover
|
||||||
$.bind quote, 'mousemove', ui.hover
|
$.bind quote, 'mousemove', ui.hover
|
||||||
$.bind quote, 'mouseout', ui.hoverend
|
$.bind quote, 'mouseout', ui.hoverend
|
||||||
@ -1504,7 +1502,7 @@ quotePreview =
|
|||||||
if @className is 'backlink'
|
if @className is 'backlink'
|
||||||
replyID = $.x('ancestor::*[@id][1]', @)?.id.match(/\d+/)[0]
|
replyID = $.x('ancestor::*[@id][1]', @)?.id.match(/\d+/)[0]
|
||||||
for quote in $$ 'a.quotelink', qp
|
for quote in $$ 'a.quotelink', qp
|
||||||
if quote.getAttribute('data-href').match(/\d+$/)[0] is replyID
|
if quote.hash[1..] is replyID
|
||||||
quote.className = 'forwardlink'
|
quote.className = 'forwardlink'
|
||||||
else
|
else
|
||||||
qp.innerHTML = "Loading #{id}..."
|
qp.innerHTML = "Loading #{id}..."
|
||||||
@ -1539,8 +1537,7 @@ quoteOP =
|
|||||||
return if root.className is 'inline'
|
return if root.className is 'inline'
|
||||||
tid = g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]/div', root).id
|
tid = g.THREAD_ID or $.x('ancestor::div[contains(@class,"thread")]/div', root).id
|
||||||
for quote in $$ 'a.quotelink', root
|
for quote in $$ 'a.quotelink', root
|
||||||
qid = quote.hash[1..] or quote.getAttribute('data-href').match(/\d+/)[0]
|
if quote.hash[1..] is tid
|
||||||
if qid is tid
|
|
||||||
quote.innerHTML += ' (OP)'
|
quote.innerHTML += ' (OP)'
|
||||||
|
|
||||||
reportButton =
|
reportButton =
|
||||||
@ -1972,7 +1969,7 @@ main =
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backlink, .quotelink, .forwardlink {
|
.backlink, .quotelink {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.new {
|
.new {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user