fix: resolve video download CORS via host_permissions, unify records in activities.json, and add exporter_job_info.json
This commit is contained in:
@@ -263,17 +263,22 @@
|
||||
async function init() {
|
||||
if (!ARCHIVE_DATA) {
|
||||
try {
|
||||
const res = await fetch('manifest.json');
|
||||
const res = await fetch('activities.json');
|
||||
if (res.ok) {
|
||||
ARCHIVE_DATA = await res.json();
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('Could not fetch manifest.json, checking global', e);
|
||||
try {
|
||||
const fallbackRes = await fetch('manifest.json');
|
||||
if (fallbackRes.ok) ARCHIVE_DATA = await fallbackRes.json();
|
||||
} catch (e2) {
|
||||
console.warn('Could not fetch activities.json or manifest.json', e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ARCHIVE_DATA || !ARCHIVE_DATA.activities) {
|
||||
document.getElementById('feedGrid').innerHTML = '<div class="empty-state">No activities found in manifest.json. Ensure manifest.json is in the same directory.</div>';
|
||||
document.getElementById('feedGrid').innerHTML = '<div class="empty-state">No activities found in activities.json. Ensure activities.json is in the same directory.</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user