Update _worker.js
This commit is contained in:
1 parent
6b30835f91
commit
1f8b3ec6c8
1 file changed
+3
-3
+3
-3
@@ -2124,14 +2124,14 @@ var HTML_HOMEPAGE = `
|
|||||||
<body>
|
<body>
|
||||||
<h1>QR Generator</h1>
|
<h1>QR Generator</h1>
|
||||||
<form id="qrForm">
|
<form id="qrForm">
|
||||||
<label for="textInput">Enter text:</label>
|
<label for="urlInput">Enter text:</label>
|
||||||
<input type="text" id="textInput" name="text" required>
|
<input type="text" id="urlInput" name="url" required>
|
||||||
<button type="submit">Generate QR code!</button>
|
<button type="submit">Generate QR code!</button>
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById('qrForm').addEventListener('submit', function (event) {
|
document.getElementById('qrForm').addEventListener('submit', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let text = document.getElementById('textInput').value;
|
let url = document.getElementById('urlInput').value;
|
||||||
window.open(\`/?text=\${encodeURIComponent(url)}\`, '_blank');
|
window.open(\`/?text=\${encodeURIComponent(url)}\`, '_blank');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in new issue
Block a user