about summary refs log tree commit diff
path: root/kittybox-rs/templates
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-09-29 00:54:34 +0300
committerVika <vika@fireburn.ru>2022-09-29 00:54:34 +0300
commite246ed91a62e6f7b4db57fd2f9675fcb4b7d9db8 (patch)
tree6a7d63f246676de1808030a915cbafc83568280b /kittybox-rs/templates
parentc35a55babd9aa6e1ad8797f3d54deec2f78ff78a (diff)
downloadkittybox-e246ed91a62e6f7b4db57fd2f9675fcb4b7d9db8.tar.zst
indieauth: fix submit handler not being applied
Diffstat (limited to 'kittybox-rs/templates')
-rw-r--r--kittybox-rs/templates/src/indieauth.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/kittybox-rs/templates/src/indieauth.rs b/kittybox-rs/templates/src/indieauth.rs
index 23f64e9..254b273 100644
--- a/kittybox-rs/templates/src/indieauth.rs
+++ b/kittybox-rs/templates/src/indieauth.rs
@@ -8,7 +8,12 @@ markup::define! {
         app: serde_json::Value,
         user: serde_json::Value
     ) {
-        script[src="/.kittybox/static/indieauth.js", type="module"] {}
+        script[type="module"] {
+            @markup::raw(r#"import { submit_handler } from "/.kittybox/static/indieauth.js";
+
+document.getElementById("indieauth_form").onSubmit = submit_handler;
+"#)
+        }
         main {
             form #indieauth_page[action="/.kittybox/indieauth/auth/confirm", method="POST"] {
                 noscript {