now the browser works
This commit is contained in:
parent
d4f9437714
commit
ced744ead1
1 changed files with 6 additions and 8 deletions
|
@ -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)))))
|
Loading…
Reference in a new issue