Skip to content

Commit

Permalink
Merge pull request #1036 from katerberg/main
Browse files Browse the repository at this point in the history
Removes inoperable gitcdn failover
  • Loading branch information
jamespizzurro authored Nov 12, 2024
2 parents eb24127 + 8f16962 commit 275da1c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,12 @@ const loadStrikeData = async () => {
try {
strikeData = JSON.parse(await (await fetch("https://raw.githubusercontent.com/jamespizzurro/picket-line-notifier/main/data/strikes.json", {cache: 'no-cache'})).text());
} catch (e) {
console.warn("Failed to fetch strike data from raw.githubusercontent.com! Falling back to using GitCDN...", e);
console.warn("Failed to fetch strike data from raw.githubusercontent.com! Falling back to using jsDelivr...", e);

try {
strikeData = JSON.parse(await (await fetch("https://gitcdn.link/cdn/jamespizzurro/picket-line-notifier/main/data/strikes.json", {cache: 'no-cache'})).text());
strikeData = JSON.parse(await (await fetch("https://cdn.jsdelivr.net/gh/jamespizzurro/picket-line-notifier@main/data/strikes.json", {cache: 'no-cache'})).text());
} catch (e) {
console.warn("Failed to fetch strike data from GitCDN! Falling back to using jsDelivr...", e);

try {
strikeData = JSON.parse(await (await fetch("https://cdn.jsdelivr.net/gh/jamespizzurro/picket-line-notifier@main/data/strikes.json", {cache: 'no-cache'})).text());
} catch (e) {
console.error("Failed to fetch strike data from jsDelivr!", e);
}
console.error("Failed to fetch strike data from jsDelivr!", e);
}
}

Expand Down

0 comments on commit 275da1c

Please sign in to comment.