diff options
Diffstat (limited to 'browser/templates/base.html.j2')
| -rw-r--r-- | browser/templates/base.html.j2 | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/browser/templates/base.html.j2 b/browser/templates/base.html.j2 index 8b41a85..47b3f6c 100644 --- a/browser/templates/base.html.j2 +++ b/browser/templates/base.html.j2 @@ -14,22 +14,6 @@ <h1><a href="/">Database browser</a></h1> {% block content %}{% endblock %} - <!-- https://leanrada.com/htmz/ --> - <iframe hidden name=htmz onload="setTimeout(()=>document.querySelector(contentWindow.location.hash||null)?.replaceWith(...contentDocument.body.childNodes))"></iframe> - <!-- Enable progressive enhancement for htmz --> - <script> - document.querySelectorAll("form[htmz]").forEach(function (element) { - const input = document.createElement("input"); - input.type = "hidden"; - input.name = "htmz"; - input.value = element.attributes.replace.value; - element.appendChild(input); - - const action = new URL(element.action); - action.hash = element.attributes.replace.value; - element.action = action.toString(); - element.target = "htmz"; - }); - </script> + <script src="/static/htmp.js"></script> </body> </html> |
