init commit (base extensions: notes)

This commit is contained in:
2026-09-14 07:59:32 +02:00
parent b0b859d20b
commit 7178558330
16 changed files with 2130 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
// calc-notes — open every note before printing, restore afterwards
(function () {
window.addEventListener("beforeprint", function () {
document.querySelectorAll("details.calc-note").forEach(function (d) {
d.dataset.calcWasOpen = d.open ? "1" : "0";
d.open = true;
});
});
window.addEventListener("afterprint", function () {
document.querySelectorAll("details.calc-note").forEach(function (d) {
d.open = d.dataset.calcWasOpen === "1";
delete d.dataset.calcWasOpen;
});
});
})();