diff options
author | Armaël Guéneau <armael.gueneau@ens-lyon.org> | 2020-11-02 23:56:39 (CET) |
---|---|---|
committer | Armaël Guéneau <armael.gueneau@ens-lyon.org> | 2020-11-02 23:56:39 (CET) |
commit | a3d49b27311fcd0e97b988aa35c8be4a23187fa3 (patch) | |
tree | 39d4bac770fc49d83520d0534109cb111d022825 | |
parent | fe12ced01a7db69f960cc3cbdc48df7b6f300ce9 (diff) | |
download | dict-master.tar.gz dict-master.tar.bz2 |
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | dict.ml | 7 |
2 files changed, 7 insertions, 6 deletions
@@ -1,9 +1,7 @@ .PHONY: dict deploy clean -dict: - dune build - -deploy: dict +deploy: + dune build --profile=release mkdir -p public cp _build/default/dict.bc.js public/dict.js cp -r css public/ @@ -109,12 +109,15 @@ let () = let main = Dom_html.getElementById "main" in let input_node = Tyxml_js.To_dom.of_input input_box in let anchor () = - Dom_html.window##.location##.hash |> Js.to_string + Dom_html.window##.location##.hash + |> Js.decodeURIComponent + |> Js.to_string |> String.chop_prefix ~pre:"#" |> Option.get_or ~default:"" in let set_anchor s = - Dom_html.window##.location##.hash := Js.string ("#" ^ s) in + Dom_html.window##.location##.hash := Js.string s + in Lwt.async (fun _ -> Lwt_js_events.domContentLoaded () >>= fun _ -> |