1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-15 13:50:27 +02:00

Undo setupPrintPage

This commit is contained in:
Alexandre Senges
2023-08-15 10:46:08 +00:00
parent d7b743028d
commit 0250c5aa12

View File

@ -145,18 +145,11 @@
// Create headers on the print page.
function setupPrintPage() {
for (const notes of document.querySelectorAll("details")) {
let summaryContent;
if (notes.getAttribute("solution") !== null) {
notes.open = false;
summaryContent = "Solution";
} else {
notes.open = true;
summaryContent = "Speaker Notes";
}
const summary = document.createElement("summary");
notes.open = true;
let summary = document.createElement("summary");
notes.insertBefore(summary, notes.firstChild);
const h4 = document.createElement("h4");
h4.append(summaryContent);
let h4 = document.createElement("h4");
h4.append("Speaker Notes");
summary.append(h4);
}
}