Change folder hierarchy
This commit is contained in:
@@ -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;
|
||||
});
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user