mirror of
https://github.com/Floriansylvain/compact-portfolio.git
synced 2026-08-19 11:43:19 +02:00
feat: optimize stylesheet loading and implement SRI hash generation for security
This commit is contained in:
@@ -75,3 +75,12 @@ if (menuBtn && nav) {
|
||||
if (e.key === "Escape") closeMenu();
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const links = document.querySelectorAll("link[data-onload]");
|
||||
links.forEach((link) => {
|
||||
const onloadCode = link.getAttribute("data-onload");
|
||||
link.onload = new Function(onloadCode);
|
||||
link.removeAttribute("data-onload");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user