Fix reviewer download

This commit is contained in:
guyeisenkot
2025-07-28 10:19:58 +03:00
parent b19301b5e5
commit bada701848
2 changed files with 5 additions and 3 deletions

View File

@@ -948,7 +948,8 @@
}
function downloadReviewer(slug) {
fetch(`/_reviewers/${slug}.md`)
const url = `https://raw.githubusercontent.com/baz-scm/awesome-reviewers/main/_reviewers/${slug}.md`;
fetch(url)
.then(res => {
if (!res.ok) throw new Error('Fetch failed');
return res.text();

View File

@@ -57,7 +57,7 @@ layout: default
<span id="copy-text">Copy Prompt</span>
</button>
<button class="share-button copy-button" onclick="shareFromDrawer(event)">Share</button>
<button class="share-button" onclick="downloadFromDrawer(event)">Download</button>
<button class="share-button copy-button" onclick="downloadFromDrawer(event)">Download</button>
</div>
</div>
@@ -212,7 +212,8 @@ layout: default
}
function downloadReviewer(slug) {
fetch(`/_reviewers/${slug}.md`)
const url = `https://raw.githubusercontent.com/baz-scm/awesome-reviewers/main/_reviewers/${slug}.md`;
fetch(url)
.then(res => {
if (!res.ok) throw new Error('Fetch failed');
return res.text();