Add target _blank to linkified dead quotes leading to archives.
This commit is contained in:
parent
54c268603a
commit
ec2cf130d1
@ -3342,7 +3342,7 @@
|
|||||||
return g.callbacks.push(this.node);
|
return g.callbacks.push(this.node);
|
||||||
},
|
},
|
||||||
node: function(post) {
|
node: function(post) {
|
||||||
var board, className, data, href, i, id, index, m, node, nodes, quote, quotes, snapshot, text, _i, _len, _ref;
|
var board, className, data, href, i, id, index, m, node, nodes, quote, quotes, snapshot, target, text, _i, _len, _ref;
|
||||||
if (post["class"] === 'inline') return;
|
if (post["class"] === 'inline') return;
|
||||||
snapshot = d.evaluate('.//text()[not(parent::a)]', post.el.lastChild, null, 6, null);
|
snapshot = d.evaluate('.//text()[not(parent::a)]', post.el.lastChild, null, 6, null);
|
||||||
for (i = 0, _ref = snapshot.snapshotLength; 0 <= _ref ? i < _ref : i > _ref; 0 <= _ref ? i++ : i--) {
|
for (i = 0, _ref = snapshot.snapshotLength; 0 <= _ref ? i < _ref : i > _ref; 0 <= _ref ? i++ : i--) {
|
||||||
@ -3359,14 +3359,17 @@
|
|||||||
if (board === g.BOARD && $.id(id)) {
|
if (board === g.BOARD && $.id(id)) {
|
||||||
href = "#" + id;
|
href = "#" + id;
|
||||||
className = 'quotelink';
|
className = 'quotelink';
|
||||||
|
target = null;
|
||||||
} else {
|
} else {
|
||||||
href = Redirect.thread(board, id, 'post');
|
href = Redirect.thread(board, id, 'post');
|
||||||
className = 'deadlink';
|
className = 'deadlink';
|
||||||
|
target = '_blank';
|
||||||
}
|
}
|
||||||
nodes.push($.el('a', {
|
nodes.push($.el('a', {
|
||||||
textContent: "" + quote + "\u00A0(Dead)",
|
textContent: "" + quote + "\u00A0(Dead)",
|
||||||
href: href,
|
href: href,
|
||||||
className: className
|
className: className,
|
||||||
|
target: target
|
||||||
}));
|
}));
|
||||||
data = data.slice(index + quote.length);
|
data = data.slice(index + quote.length);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2808,15 +2808,18 @@ Quotify =
|
|||||||
if board is g.BOARD and $.id id
|
if board is g.BOARD and $.id id
|
||||||
href = "##{id}"
|
href = "##{id}"
|
||||||
className = 'quotelink'
|
className = 'quotelink'
|
||||||
|
target = null
|
||||||
else
|
else
|
||||||
href = Redirect.thread board, id, 'post'
|
href = Redirect.thread board, id, 'post'
|
||||||
className = 'deadlink'
|
className = 'deadlink'
|
||||||
|
target = '_blank'
|
||||||
|
|
||||||
nodes.push $.el 'a',
|
nodes.push $.el 'a',
|
||||||
# \u00A0 is nbsp
|
# \u00A0 is nbsp
|
||||||
textContent: "#{quote}\u00A0(Dead)"
|
textContent: "#{quote}\u00A0(Dead)"
|
||||||
href: href
|
href: href
|
||||||
className: className
|
className: className
|
||||||
|
target: target
|
||||||
|
|
||||||
data = data[index + quote.length..]
|
data = data[index + quote.length..]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user