Show only first line of script in index page

This commit is contained in:
Shweelan Samson authored and Zaid Abdulla committed 2018-12-27 01:21:18 -08:00
1 parent c702003c32
commit 28a6ec950e
2 files changed
+12 -8

No files matched your search

+9 -3
View File
@@ -181,9 +181,15 @@ function renderTable(
const tds = [m("td", checkbox)];
for (const attr of attributes) {
if (attr.id == "script")
tds.push(m("td", { title: provision[attr.id] }, provision[attr.id]));
else tds.push(m("td", provision[attr.id]));
if (attr.id == "script") {
const firstLines = provision[attr.id].split("\n", 11);
if (firstLines.length > 10) firstLines[10] = ["\ufe19"];
tds.push(
m("td", { title: firstLines.join("\n") }, firstLines[0] || "")
);
} else {
tds.push(m("td", provision[attr.id]));
}
}
tds.push(