All checks were successful
Build And Deploy / build-and-deploy (push) Successful in 5m19s
(mit.svg), and htmz assets (htmz.js and htmz.dev.js). Add LICENSE file containing this project's MIT license and 3rd-party component licenses.
11 lines
374 B
JavaScript
11 lines
374 B
JavaScript
function htmz(frame) {
|
|
if (frame.contentWindow.location.href === "about:blank") return;
|
|
setTimeout(() => {
|
|
document
|
|
.querySelector(frame.contentWindow.location.hash || null)
|
|
?.replaceWith(...frame.contentDocument.body.childNodes);
|
|
frame.contentWindow.location.replace("about:blank");
|
|
frame.remove();
|
|
document.body.appendChild(frame);
|
|
});
|
|
}
|