Files
hugo/assets/js/print-support.js
kbrianngeno 6330092560
Some checks failed
Blowfish Docs Deploy / build (push) Has been cancelled
Blowfish Docs Deploy / deploy (push) Has been cancelled
Test Build / Build Example Site (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Update Hugo version / updateBlowfish (push) Has been cancelled
First commit
Delete exampleSite
Add initial content, images & docker-compose.yml
Use extend-head.html for analytics
Set remote url to gitea.novicelab.io
Remove original .git due to "shallow update not allowed" error
2026-03-14 14:43:39 +00:00

18 lines
502 B
JavaScript

(function() {
'use strict';
var closedDetails = [];
window.addEventListener('beforeprint', function() {
var allDetails = document.querySelectorAll('details:not([open])');
for (var i = 0; i < allDetails.length; i++) {
allDetails[i].open = true;
closedDetails.push(allDetails[i]);
}
});
window.addEventListener('afterprint', function() {
for (var i = 0; i < closedDetails.length; i++) {
closedDetails[i].open = false;
}
closedDetails = [];
});
})();