diff --git a/public/js/plugin-download.js b/public/js/plugin-download.js index a335e03..2346fe2 100644 --- a/public/js/plugin-download.js +++ b/public/js/plugin-download.js @@ -68,7 +68,12 @@ const buildTable = (chapters) => { $('table').append(thead); const rows = chapters.map(ch => { - const tds = Object.values(ch).map(v => `${v}`).join(''); + const tds = Object.values(ch).map(v => { + const maxLength = 40; + const shouldShrink = v.length > maxLength; + const content = shouldShrink ? `${v.substring(0, maxLength)}...
${v}
` : v; + return `${content}` + }).join(''); return `${tds}`; }); const tbody = `${rows}`;