Commit 1cbececd authored by Benoit Barbot's avatar Benoit Barbot
Browse files

prog

parent 5a4d9867
Pipeline #1690 passed with stages
in 31 seconds
......@@ -97,6 +97,7 @@ let _ = run @@ fun () ->
let worker = Js_of_ocaml.Worker.create "worker.js" in
let buffstd = Buffer.create 100 in
let buffdata = Buffer.create 100 in
let dirlink,dirlink_up = div' [] in
worker##.onmessage := ( Dom.handler (fun m -> (match m##.data with
| Worker_sync.StdOut s ->
Buffer.add_string buffstd s;
......@@ -151,7 +152,12 @@ let _ = run @@ fun () ->
only_parse = not b;
}) in
let txin = text_area ~class_:"input_file col-sm-6" ~on_change:(fun x-> file_content:=x;launch_compt false) !file_content in
let txin = text_area ~class_:"input_file col-sm-6" ~on_change:(fun x->
file_content:=x;
let open Js_of_ocaml.Url in
let link = Current.path_string in
dirlink_up [a ~href:(link^"?q="^x) [text "Direct link"] ];
launch_compt false) !file_content in
launch_compt true;
div ~class_:"main container-fluid"[
......@@ -159,14 +165,7 @@ let _ = run @@ fun () ->
build_interface ~class_:"" ~stop:(fun () -> worker##postMessage (Worker_sync.Stop)) launch_compt spec_short;];
div ~class_:"" [div ~class_:"output" [ txin; container]];
br ();
(* a ~on_click:(fun () ->
let open Js_of_ocaml.Url in
let link = Current.path_string in
match url_of_string "google.fr" with
Some x -> Current.set x
| None -> ()
;
) [text "direct link"];*)
dirlink;
alert; sigt;
(div ~class_:"output" [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment