Add link to individual state

This commit is contained in:
Chandler Swift 2024-02-29 23:24:22 -06:00
parent b062accb68
commit c16925231e
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -36,6 +36,13 @@
await selectState(ss.value); await selectState(ss.value);
document.getElementById('game').style.display = 'block'; document.getElementById('game').style.display = 'block';
}); });
// Check if there's a parameter in the URL already
const state = (new URLSearchParams(window.location.search)).get('state');
if (state) {
ss.value = state;
document.getElementById('go-button').click();
}
})(); })();
import { createApp } from 'https://unpkg.com/petite-vue?module' import { createApp } from 'https://unpkg.com/petite-vue?module'