Save a character, show linebreaks as spaces in the thread watcher too.
This commit is contained in:
parent
73b4a19384
commit
1c33c598a3
@ -1868,10 +1868,19 @@
|
||||
return watcher.refresh();
|
||||
},
|
||||
watch: function(thread, id) {
|
||||
var props, tc, watched, _name;
|
||||
tc = $('span.filetitle', thread).textContent || $('blockquote', thread).textContent;
|
||||
var el, props, span, watched, _name;
|
||||
el = $('span.filetitle');
|
||||
if (!el.textContent) {
|
||||
el = $('blockquote');
|
||||
if (!el.textContent) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
span = $.el('span', {
|
||||
innerHTML: el.innerHTML.replace(/<br>/g, ' ')
|
||||
});
|
||||
props = {
|
||||
textContent: "/" + g.BOARD + "/ - " + tc.slice(0, 25),
|
||||
textContent: "/" + g.BOARD + "/ - " + span.textContent.slice(0, 25),
|
||||
href: "/" + g.BOARD + "/res/" + id
|
||||
};
|
||||
watched = $.get('watched', {});
|
||||
@ -2066,7 +2075,7 @@
|
||||
}
|
||||
}
|
||||
span = $.el('span', {
|
||||
innerHTML: el.innerHTML.replace(/<br>/g, '\n')
|
||||
innerHTML: el.innerHTML.replace(/<br>/g, ' ')
|
||||
});
|
||||
return d.title = "/" + g.BOARD + "/ - " + span.textContent;
|
||||
}
|
||||
|
||||
@ -1535,9 +1535,15 @@ watcher =
|
||||
watcher.refresh()
|
||||
|
||||
watch: (thread, id) ->
|
||||
tc = $('span.filetitle', thread).textContent or $('blockquote', thread).textContent
|
||||
el = $ 'span.filetitle'
|
||||
if not el.textContent
|
||||
el = $ 'blockquote'
|
||||
if not el.textContent
|
||||
return
|
||||
span = $.el 'span',
|
||||
innerHTML: el.innerHTML.replace /<br>/g, ' '
|
||||
props =
|
||||
textContent: "/#{g.BOARD}/ - #{tc[...25]}"
|
||||
textContent: "/#{g.BOARD}/ - #{span.textContent[...25]}"
|
||||
href: "/#{g.BOARD}/res/#{id}"
|
||||
|
||||
watched = $.get 'watched', {}
|
||||
@ -1654,7 +1660,7 @@ titlePost =
|
||||
if not el.textContent
|
||||
return
|
||||
span = $.el 'span',
|
||||
innerHTML: el.innerHTML.replace /<br>/g, '\n'
|
||||
innerHTML: el.innerHTML.replace /<br>/g, ' '
|
||||
d.title = "/#{g.BOARD}/ - #{span.textContent}"
|
||||
|
||||
quoteBacklink =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user