-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c4f7af
commit 6256d87
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
function loadScript(scriptUrl, options) { | ||
var script = document.createElement('script'); | ||
script.src = scriptUrl; | ||
script.onload = function() { | ||
console.log('Script loaded successfully'); | ||
}; | ||
script.onerror = function() { | ||
console.log('Failed to load script: ' + scriptUrl); | ||
var backups = options && options.backups; | ||
if (backups && backups.length > 0) { | ||
console.log('Attempting to load backups...'); | ||
loadBackupScripts(backups, 0); | ||
} else { | ||
console.log('No backups available.'); | ||
} | ||
}; | ||
document.head.appendChild(script); | ||
} | ||
|
||
function loadBackupScripts(backups, currentIndex) { | ||
if (currentIndex >= backups.length) { | ||
console.log('All backup scripts failed to load.'); | ||
return; | ||
} | ||
|
||
var backupScriptUrl = backups[currentIndex]; | ||
var backupScript = document.createElement('script'); | ||
backupScript.src = backupScriptUrl; | ||
backupScript.onload = function() { | ||
console.log('Backup script loaded successfully'); | ||
}; | ||
backupScript.onerror = function() { | ||
console.log('Failed to load backup script: ' + backupScriptUrl); | ||
loadBackupScripts(backups, currentIndex + 1); | ||
}; | ||
document.head.appendChild(backupScript); | ||
} | ||
|
||
loadScript('https://unpkg.com/@ruffle-rs/ruffle', { backups: ['https://cdn.jsdelivr.net/npm/@ruffle-rs/ruffle/ruffle.min.js', './ruffle/ruffle.js'] }); |
6256d87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mgg658 – ./
mgg658.vercel.app
mgg658-git-main-franciscogonzalez2025-geringschool.vercel.app
mgg658-franciscogonzalez2025-geringschool.vercel.app
6256d87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mountain658 – ./
mountain658-git-main-franciscogonzalez2025-geringschool.vercel.app
mountain658.ga
mountain658-franciscogonzalez2025-geringschool.vercel.app
mountain-game-658.ga
mountaingameg658.ga
mountain658.vercel.app
mountain-658.ga
mgg658.ga