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 = { titlePost = {
init: function() { init: function() {
var tc; var el, span;
if (tc = $('span.filetitle').textContent || $('blockquote').textContent) { el = $('span.filetitle');
return d.title = "/" + g.BOARD + "/ - " + tc; 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 = { quoteBacklink = {

View File

@ -1648,8 +1648,14 @@ Time =
titlePost = titlePost =
init: -> init: ->
if tc = $('span.filetitle').textContent or $('blockquote').textContent el = $ 'span.filetitle'
d.title = "/#{g.BOARD}/ - #{tc}" 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 = quoteBacklink =
init: -> init: ->