Skip to content

Commit 5488929

Browse files
committed
WebHost: Restore game name in description, don't hardcode archipelago.gg
ArchipelagoMW#1820 added the game name to template export, but when ArchipelagoMW#2143 began overriding the description in Javascript to name the preset it removed the game name. Also while I was here I figured we might as well not hardcode https://archipelago.gg, since it can be useful to know if a YAML was generated by some other Web Host (for example http://archipelago.gg:24242 if coming from the beta site)
1 parent b0638b9 commit 5488929

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WebHostLib/static/assets/player-options.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,15 @@ const exportOptions = () => {
452452
const preset = localStorage.getItem(`${gameName}-preset`);
453453
switch (preset) {
454454
case '__default':
455-
options['description'] = `Generated by https://archipelago.gg with the default preset.`;
455+
options['description'] = `Generated by ${window.location.origin} for ${gameName} with the default preset.`;
456456
break;
457457

458458
case '__custom':
459-
options['description'] = `Generated by https://archipelago.gg.`;
459+
options['description'] = `Generated by ${window.location.origin} for ${gameName}.`;
460460
break;
461461

462462
default:
463-
options['description'] = `Generated by https://archipelago.gg with the ${preset} preset.`;
463+
options['description'] = `Generated by ${window.location.origin} for ${gameName} with the ${preset} preset.`;
464464
}
465465

466466
if (!options.name || options.name.toString().trim().length === 0) {

0 commit comments

Comments
 (0)