fix #238, Show linebreaks as spaces in tab titles

This commit is contained in:
James Campos 2011-08-20 12:17:49 -07:00
parent 575d4cac98
commit 73b4a19384
2 changed files with 19 additions and 5 deletions

View File

@ -2057,10 +2057,18 @@
};
titlePost = {
init: function() {
var tc;
if (tc = $('span.filetitle').textContent || $('blockquote').textContent) {
return d.title = "/" + g.BOARD + "/ - " + tc;
var el, span;
el = $('span.filetitle');
if (!el.textContent) {
el = $('blockquote');
if (!el.textContent) {
return;
}
}
span = $.el('span', {
innerHTML: el.innerHTML.replace(/<br>/g, '\n')
});
return d.title = "/" + g.BOARD + "/ - " + span.textContent;
}
};
quoteBacklink = {

View File

@ -1648,8 +1648,14 @@ Time =
titlePost =
init: ->
if tc = $('span.filetitle').textContent or $('blockquote').textContent
d.title = "/#{g.BOARD}/ - #{tc}"
el = $ 'span.filetitle'
if not el.textContent
el = $ 'blockquote'
if not el.textContent
return
span = $.el 'span',
innerHTML: el.innerHTML.replace /<br>/g, '\n'
d.title = "/#{g.BOARD}/ - #{span.textContent}"
quoteBacklink =
init: ->