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();
|
return watcher.refresh();
|
||||||
},
|
},
|
||||||
watch: function(thread, id) {
|
watch: function(thread, id) {
|
||||||
var props, tc, watched, _name;
|
var el, props, span, watched, _name;
|
||||||
tc = $('span.filetitle', thread).textContent || $('blockquote', thread).textContent;
|
el = $('span.filetitle');
|
||||||
|
if (!el.textContent) {
|
||||||
|
el = $('blockquote');
|
||||||
|
if (!el.textContent) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span = $.el('span', {
|
||||||
|
innerHTML: el.innerHTML.replace(/<br>/g, ' ')
|
||||||
|
});
|
||||||
props = {
|
props = {
|
||||||
textContent: "/" + g.BOARD + "/ - " + tc.slice(0, 25),
|
textContent: "/" + g.BOARD + "/ - " + span.textContent.slice(0, 25),
|
||||||
href: "/" + g.BOARD + "/res/" + id
|
href: "/" + g.BOARD + "/res/" + id
|
||||||
};
|
};
|
||||||
watched = $.get('watched', {});
|
watched = $.get('watched', {});
|
||||||
@ -2066,7 +2075,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
span = $.el('span', {
|
span = $.el('span', {
|
||||||
innerHTML: el.innerHTML.replace(/<br>/g, '\n')
|
innerHTML: el.innerHTML.replace(/<br>/g, ' ')
|
||||||
});
|
});
|
||||||
return d.title = "/" + g.BOARD + "/ - " + span.textContent;
|
return d.title = "/" + g.BOARD + "/ - " + span.textContent;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1535,9 +1535,15 @@ watcher =
|
|||||||
watcher.refresh()
|
watcher.refresh()
|
||||||
|
|
||||||
watch: (thread, id) ->
|
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 =
|
props =
|
||||||
textContent: "/#{g.BOARD}/ - #{tc[...25]}"
|
textContent: "/#{g.BOARD}/ - #{span.textContent[...25]}"
|
||||||
href: "/#{g.BOARD}/res/#{id}"
|
href: "/#{g.BOARD}/res/#{id}"
|
||||||
|
|
||||||
watched = $.get 'watched', {}
|
watched = $.get 'watched', {}
|
||||||
@ -1654,7 +1660,7 @@ titlePost =
|
|||||||
if not el.textContent
|
if not el.textContent
|
||||||
return
|
return
|
||||||
span = $.el 'span',
|
span = $.el 'span',
|
||||||
innerHTML: el.innerHTML.replace /<br>/g, '\n'
|
innerHTML: el.innerHTML.replace /<br>/g, ' '
|
||||||
d.title = "/#{g.BOARD}/ - #{span.textContent}"
|
d.title = "/#{g.BOARD}/ - #{span.textContent}"
|
||||||
|
|
||||||
quoteBacklink =
|
quoteBacklink =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user