mirror of
https://github.com/pfalstad/circuitjs1.git
synced 2026-03-03 15:14:04 +01:00
24 lines
714 B
HTML
24 lines
714 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta name="viewport" content="width=820">
|
|
<title>CircuitJS websockets automation</title>
|
|
</head>
|
|
<body>
|
|
<iframe id="circuitFrame" width=800 height=550></iframe>
|
|
|
|
<script type="module">
|
|
import {CircuitWS} from "./circuitws.js";
|
|
const iframe = document.querySelector("#circuitFrame");
|
|
const circuitws = new CircuitWS(iframe);
|
|
const search_params = new URLSearchParams(window.location.search);
|
|
if (search_params.has("src")) {
|
|
circuitws.reload_circuitjs(search_params.get("src"));
|
|
} else {
|
|
circuitws.reload_circuitjs("circuitjs.html?startCircuit=jsinterface.txt");
|
|
}
|
|
circuitws.initialize_parameters(search_params);
|
|
</script>
|
|
</body>
|
|
</html>
|