diff --git a/_web_server/index.html b/_web_server/index.html
index 02f27cb..fb9cf23 100644
--- a/_web_server/index.html
+++ b/_web_server/index.html
@@ -43,19 +43,12 @@
-
+
+
-
`timescale 10ps/10ps
-
-module test;
- initial begin
- $display("Hello world!");
- $finish();
- end
-endmodule
-
+
@CODE@
-
+
@@ -74,7 +67,7 @@ endmodule
});
const log_area = document.getElementById('log');
function send_to_icarus() {
- fetch('%POSTURI%',
+ fetch('%IVERILOGPOSTURI%',
{
method: 'POST',
headers: {
@@ -86,6 +79,21 @@ endmodule
.then((response) => response.text())
.then((text) => { log_area.value = text; });
};
+
+ function save_code() {
+ fetch('%SAVECODEURI%',
+ {
+ method: 'POST',
+ headers: {
+ 'Accept': 'text/plain',
+ 'Content-Type': 'text/plain'
+ },
+ body: editor.getValue()
+ })
+ .then((response) => response.text())
+ .then((text) => { window.location.href = text; });
+ };
+