Difference between revisions of "Widget:EnemyMapDropdownTest"

From Dragalia Lost Wiki
Jump to navigation Jump to search
imported>Elaeagnifolia
imported>Elaeagnifolia
Line 21: Line 21:
 
}
 
}
 
_populateSelectBox(mapSelect, mapList);
 
_populateSelectBox(mapSelect, mapList);
 +
mapSelect.value = checkURL();
 
displayEnemyMapInfo(mapSelect);
 
displayEnemyMapInfo(mapSelect);
 +
}
 +
 +
function checkURL() {
 +
var url = window.location.href;
 +
var hashIndex = url.indexOf("#");
 +
 +
if (hashIndex > -1) {
 +
var map = decodeURI(url.substring(hashIndex+1));
 +
if (maps.includes(map)) {
 +
return map;
 +
}
 +
}
 +
 +
return "Display All Quests";
 
}
 
}
  

Revision as of 14:57, 20 December 2018