From fa4ca6133e525e41bf38356f2600a5c35d4785d1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 15 Jun 2026 15:05:36 +0000
Subject: [PATCH 01/10] Initial plan
From 5eeca40e3a92171d44dac31297409c17d7753096 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 15 Jun 2026 15:09:28 +0000
Subject: [PATCH 02/10] Add GitHub Pages media gallery
---
.nojekyll | 0
README.md | 18 ++-
index.html | 456 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 473 insertions(+), 1 deletion(-)
create mode 100644 .nojekyll
create mode 100644 index.html
diff --git a/.nojekyll b/.nojekyll
new file mode 100644
index 0000000..e69de29
diff --git a/README.md b/README.md
index 1bd7e02..c27e4a9 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,18 @@
# Media
-Images and videos
+
+This repository is set up to work as a GitHub Pages media library for quick image and
+video access.
+
+## Gallery
+
+After GitHub Pages is enabled for the repository root, open the site to browse a gallery
+of every supported image and video stored in the repository.
+
+- Images and videos are discovered automatically from the repository contents.
+- Use the folder pattern `Organization/Project/Crew Member/file.ext` to populate the
+ organization, project, and crew member sort/filter controls.
+- Each gallery card includes a **Copy URL** button so links can be pasted into README
+ files, Codespaces, or other documentation.
+
+Supported media types include `.png`, `.jpg`, `.gif`, `.webp`, `.svg`, `.mp4`,
+`.webm`, `.mov`, `.ogg`, and related common image/video formats.
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..d518578
--- /dev/null
+++ b/index.html
@@ -0,0 +1,456 @@
+
+
+
+
+
+ Media Gallery
+
+
+
+
+
+ Media Gallery
+
+ Store images and videos in this repository, then browse them here. Use
+ the folder pattern Organization/Project/Crew Member/file.ext
+ to unlock automatic sorting and filtering.
+
+
+
+
+
+
+
+ No supported images or videos were found yet. Add files with extensions like
+ .png, .jpg, .webp, .mp4,
+ or .webm to this repository to populate the gallery.
+
+
+
+
+
+
+
From 8d2b9abaf0d12445f79b2ee4b77f31b51fa3a1bc Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 15 Jun 2026 15:10:12 +0000
Subject: [PATCH 03/10] Harden gallery copy and status behavior
---
index.html | 37 +++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/index.html b/index.html
index d518578..c38c9fd 100644
--- a/index.html
+++ b/index.html
@@ -216,7 +216,9 @@ Media Gallery
-
+
No supported images or videos were found yet. Add files with extensions like
.png, .jpg, .webp, .mp4,
@@ -246,9 +248,13 @@ Media Gallery
function inferRepository() {
const host = window.location.hostname;
const pathParts = window.location.pathname.split("/").filter(Boolean);
+ const githubPagesSuffix = ".github.io";
- if (host.endsWith(".github.io") && pathParts.length > 0) {
- return { owner: host.split(".")[0], repo: pathParts[0] };
+ if (host.endsWith(githubPagesSuffix) && pathParts.length > 0) {
+ return {
+ owner: host.slice(0, -githubPagesSuffix.length),
+ repo: pathParts[0],
+ };
}
return FALLBACK_REPOSITORY;
@@ -351,18 +357,29 @@ Media Gallery
async function copyToClipboard(url, button) {
try {
- await navigator.clipboard.writeText(url);
+ if (navigator.clipboard?.writeText) {
+ await navigator.clipboard.writeText(url);
+ } else {
+ const field = document.createElement("textarea");
+ field.value = url;
+ document.body.appendChild(field);
+ field.select();
+
+ if (!document.execCommand || !document.execCommand("copy")) {
+ field.remove();
+ throw new Error("Clipboard access is unavailable in this browser.");
+ }
+
+ field.remove();
+ }
} catch {
- const field = document.createElement("textarea");
- field.value = url;
- document.body.appendChild(field);
- field.select();
- document.execCommand("copy");
- field.remove();
+ status.textContent = "Copy failed. Open the file directly and copy the URL from the browser.";
+ return;
}
const originalText = button.textContent;
button.textContent = "Copied!";
+ status.textContent = `Copied ${url}`;
setTimeout(() => {
button.textContent = originalText;
}, 1200);
From 98feb141d4ba2f55733063997e4a38cb991afce3 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 15 Jun 2026 15:10:47 +0000
Subject: [PATCH 04/10] Polish gallery fallback configuration
---
index.html | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index c38c9fd..30c1472 100644
--- a/index.html
+++ b/index.html
@@ -3,6 +3,8 @@
+
+
Media Gallery