feat: add admonitions

This commit is contained in:
rxchi1d authored and ZhenShuo Leo committed 2025-12-22 09:53:58 +08:00
1 parent 1fc6058426
commit 775d5b1bbf
18 files changed
+664 -5

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
(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 = [];
});
})();