now the browser works

This commit is contained in:
jem 2021-02-26 17:56:49 +01:00
parent d4f9437714
commit ced744ead1

View file

@ -5,25 +5,23 @@
(defn config-from-document [] (defn config-from-document []
(-> js/document (-> js/document
(.getElementById "config") (.getElementById "config")
(.-innerHTML))) (.-value)))
(defn auth-from-document [] (defn auth-from-document []
(-> js/document (-> js/document
(.getElementById "auth") (.getElementById "auth")
(.-innerHTML))) (.-value)))
(defn render-to-document (defn render-to-document
[input] [input]
(-> js/document (-> js/document
(.getElementById "output") (.getElementById "output")
(.-innerHTML) (.-value)
(set! input))) (set! input)))
(defn generate []
(-> (dda.k8s-mastodon-bot.core/generate (config-from-document) (auth-from-document))
(render-to-document)))
(defn init [] (defn init []
(-> js/document (-> js/document
(.getElementById "generate-button") (.getElementById "generate-button")
(.addEventListener "click" generate))) (.addEventListener "click"
#(-> (core/generate (config-from-document) (auth-from-document))
(render-to-document)))))