Skip to content

Commit

Permalink
Update _worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
xixu-me committed Sep 3, 2024
1 parent 1f8b3ec commit b70ef67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2124,14 +2124,14 @@ var HTML_HOMEPAGE = `
<body>
<h1>QR Generator</h1>
<form id="qrForm">
<label for="urlInput">Enter text:</label>
<input type="text" id="urlInput" name="url" required>
<label for="textInput">Enter text:</label>
<input type="text" id="textInput" name="url" required>
<button type="submit">Generate QR code!</button>
</form>
<script>
document.getElementById('qrForm').addEventListener('submit', function (event) {
event.preventDefault();
let url = document.getElementById('urlInput').value;
let url = document.getElementById('textInput').value;
window.open(\`/?text=\${encodeURIComponent(url)}\`, '_blank');
});
</script>
Expand Down Expand Up @@ -2163,3 +2163,4 @@ var src_default = {
export {
src_default as default
};

0 comments on commit b70ef67

Please sign in to comment.