-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.html
More file actions
20 lines (18 loc) · 696 Bytes
/
form.html
File metadata and controls
20 lines (18 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<body>
<form id="gh-form" method="POST" action="https://github.com/ApplePair111/ArduinoWebIDE/actions/workflows/compile-arduino.yml/dispatches">
<input type="hidden" name="ref" value="main" />
<input type="hidden" name="inputs[sketch]" id="sketch" />
</form>
<script>
window.addEventListener("message", (event) => {
const sketch = event.data?.sketch;
if (!sketch) return console.warn("No sketch provided");
console.log("[📨] Received sketch via postMessage");
document.getElementById("sketch").value = sketch;
document.getElementById("gh-form").submit();
});
</script>
</body>
</html>