------------------------------------------------------------
commit f30d064c663d56abe864003092c2fed88627c8cf
Author: ffff:72.234.190.31 <ffff:72.234.190.31@hub.scroll.pub>
Date: Mon Nov 11 16:54:50 2024 +0000
Updated claude.parsers
diff --git a/claude.parsers b/claude.parsers
index a17a733..95aa4b9 100644
--- a/claude.parsers
+++ b/claude.parsers
@@ -35,7 +35,6 @@ webCamParser
margin-top: 10px;
}
`
-
return `
${containerStyle}
<div class="webcamContainer">
@@ -55,7 +54,6 @@ webCamParser
const retakeButton = document.getElementById('retake${id}');
const capturedImage = document.getElementById('capturedImage${id}');
const ctx = canvas.getContext('2d');
-
try {
const stream = await navigator.mediaDevices.getUserMedia({
video: {
@@ -68,7 +66,6 @@ webCamParser
console.error('Error accessing webcam:', err);
return;
}
-
captureButton.addEventListener('click', () => {
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
const imageData = canvas.toDataURL('image/png');
@@ -77,14 +74,12 @@ webCamParser
capturedImage.style.display = 'block';
captureButton.style.display = 'none';
retakeButton.style.display = 'inline-block';
-
// Create a custom event with the image data
const event = new CustomEvent('imageCaptured', {
detail: { imageData, timestamp: new Date().toISOString() }
});
document.dispatchEvent(event);
});
-
retakeButton.addEventListener('click', () => {
video.style.display = 'block';
capturedImage.style.display = 'none';
------------------------------------------------------------
commit 4e6f65a0f1de1be42176265e7966cd300e4807a8
Author: ffff:72.234.190.31 <ffff:72.234.190.31@hub.scroll.pub>
Date: Mon Nov 11 16:54:17 2024 +0000
Updated index.scroll
diff --git a/index.scroll b/index.scroll
index 4442ed6..62a61b8 100644
--- a/index.scroll
+++ b/index.scroll
@@ -1,4 +1,7 @@
buildHtml
+
theme roboto
-Hello World my name is
\ No newline at end of file
+claude.parsers
+
+webCam
------------------------------------------------------------
commit 0911585695064dee429147fbad39a8ce18e99f56
Author: ffff:72.234.190.31 <ffff:72.234.190.31@hub.scroll.pub>
Date: Mon Nov 11 16:54:07 2024 +0000
Updated claude.parsers
diff --git a/claude.parsers b/claude.parsers
index e69de29..a17a733 100644
--- a/claude.parsers
+++ b/claude.parsers
@@ -0,0 +1,97 @@
+webCamParser
+ extends abstractScrollWithRequirementsParser
+ description Access the device webcam with optional controls for capturing images.
+ cueFromId
+ inScope widthParser heightParser
+ javascript
+ compileInstance() {
+ const id = "webcam" + this._getUid()
+ const width = this.get("width") || "640"
+ const height = this.get("height") || "480"
+ const containerStyle = `
+ .webcamContainer {
+ position: relative;
+ width: ${width}px;
+ margin: 20px auto;
+ }
+ .webcamControls {
+ margin-top: 10px;
+ text-align: center;
+ }
+ .webcamButton {
+ background: #0066cc;
+ color: white;
+ border: none;
+ padding: 8px 16px;
+ border-radius: 4px;
+ margin: 0 5px;
+ cursor: pointer;
+ }
+ .webcamButton:hover {
+ background: #0052a3;
+ }
+ .capturedImage {
+ display: none;
+ margin-top: 10px;
+ }
+ `
+
+ return `
+ ${containerStyle}
+ <div class="webcamContainer">
+ <video id="video${id}" width="${width}" height="${height}" autoplay playsinline></video>
+ <canvas id="canvas${id}" width="${width}" height="${height}" style="display:none;"></canvas>
+ <img id="capturedImage${id}" class="capturedImage" width="${width}" height="${height}">
+ <div class="webcamControls">
+ <button id="capture${id}" class="webcamButton">Capture Image</button>
+ <button id="retake${id}" class="webcamButton" style="display:none;">Retake</button>
+ </div>
+ </div>
+ <script>
+ (async () => {
+ const video = document.getElementById('video${id}');
+ const canvas = document.getElementById('canvas${id}');
+ const captureButton = document.getElementById('capture${id}');
+ const retakeButton = document.getElementById('retake${id}');
+ const capturedImage = document.getElementById('capturedImage${id}');
+ const ctx = canvas.getContext('2d');
+
+ try {
+ const stream = await navigator.mediaDevices.getUserMedia({
+ video: {
+ width: { ideal: ${width} },
+ height: { ideal: ${height} }
+ }
+ });
+ video.srcObject = stream;
+ } catch (err) {
+ console.error('Error accessing webcam:', err);
+ return;
+ }
+
+ captureButton.addEventListener('click', () => {
+ ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
+ const imageData = canvas.toDataURL('image/png');
+ capturedImage.src = imageData;
+ video.style.display = 'none';
+ capturedImage.style.display = 'block';
+ captureButton.style.display = 'none';
+ retakeButton.style.display = 'inline-block';
+
+ // Create a custom event with the image data
+ const event = new CustomEvent('imageCaptured', {
+ detail: { imageData, timestamp: new Date().toISOString() }
+ });
+ document.dispatchEvent(event);
+ });
+
+ retakeButton.addEventListener('click', () => {
+ video.style.display = 'block';
+ capturedImage.style.display = 'none';
+ captureButton.style.display = 'inline-block';
+ retakeButton.style.display = 'none';
+ });
+ })();
+ </script>
+ `
+ }
------------------------------------------------------------
commit 845dd40ce39100fd3728e22669fc0515fa5756a2
Author: ffff:72.234.190.31 <ffff:72.234.190.31@hub.scroll.pub>
Date: Mon Nov 11 16:54:04 2024 +0000
Updated claude.parsers
diff --git a/claude.parsers b/claude.parsers
new file mode 100644
index 0000000..e69de29
------------------------------------------------------------
commit 93e43037b7794c5d3de89eaf6afe3e3d561d8df3
Author: root <root@hub.scroll.pub>
Date: Sun Nov 10 20:12:15 2024 +0000
initial blank_template template
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bd1a52d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+.DS_Store
+*.html
+*.txt
+*.xml
+*.css
+*.js
+*.csv
+requests.scroll
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..4442ed6
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,4 @@
+buildHtml
+theme roboto
+
+Hello World my name is
\ No newline at end of file