partial fix for current game not appearing in drop-down list

This commit is contained in:
Jesse D. McDonald 2020-03-13 02:02:23 -05:00
parent 54f29398e2
commit 35354b0c93
1 changed files with 7 additions and 8 deletions

View File

@ -721,6 +721,13 @@ $(function (){
$('#cb_light_name').on('input', updateMeta);
$('#cb_dark_name').on('input', updateMeta);
var gameId = location.hash.replace(/^#\//, '');
if (gameId.length !== 16) {
gameId = randomId();
}
switchGameId(gameId);
function updateTitle(opt){
opt = $(opt);
@ -807,14 +814,6 @@ $(function (){
switchGameId(gameId);
}
};
var gameId = location.hash.replace(/^#\//, '');
if (gameId.length !== 16) {
gameId = randomId();
}
switchGameId(gameId);
});
/* vim:set expandtab sw=3 ts=8: */