forked from rDrama/rDrama
fix show more button
parent
c3a5418d3a
commit
f7874b2c4e
|
@ -283,6 +283,10 @@ function showmore() {
|
|||
btn.innerHTML = 'SHOW LESS'
|
||||
}
|
||||
|
||||
for (const element of document.getElementsByClassName('showmore')) {
|
||||
element.onclick = showmore;
|
||||
}
|
||||
|
||||
function formatDate(d) {
|
||||
let year = d.getFullYear();
|
||||
let monthAbbr = d.toLocaleDateString('en-us', {month: 'short'});
|
||||
|
|
|
@ -411,7 +411,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
|
|||
sanitized = sanitized.replace('\n','')
|
||||
|
||||
if showmore and len(sanitized) > 3500:
|
||||
sanitized = showmore_regex.sub(r'\1<p><button class="showmore" data-nonce="{{g.nonce}}" data-onclick="showmore()">SHOW MORE</button></p><d class="d-none">\2</d>', sanitized, count=1)
|
||||
sanitized = showmore_regex.sub(r'\1<p><button class="showmore" data-nonce="{{g.nonce}}">SHOW MORE</button></p><d class="d-none">\2</d>', sanitized, count=1)
|
||||
|
||||
return sanitized.strip()
|
||||
|
||||
|
|
Loading…
Reference in New Issue