Fix player-settings not defaulting the select options to their proper values. Also fix tab title.
This commit is contained in:
parent
610871c61b
commit
f15bb9dbd7
|
@ -24,7 +24,7 @@ window.addEventListener('load', () => {
|
|||
nameInput.value = playerSettings.name;
|
||||
}).catch((error) => {
|
||||
const url = new URL(window.location.href);
|
||||
// window.location.replace(`${url.protocol}//${url.hostname}/page-not-found`);
|
||||
window.location.replace(`${url.protocol}//${url.hostname}/page-not-found`);
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -97,8 +97,10 @@ const buildOptionsTable = (settings, romOpts = false) => {
|
|||
const option = document.createElement('option');
|
||||
option.setAttribute('value', opt.value);
|
||||
option.innerText = opt.name;
|
||||
if ((isNaN(currentSettings[setting]) && (parseInt(opt.value, 10) === parseInt(currentSettings[setting]))) ||
|
||||
(opt.value === currentSettings[setting])) {
|
||||
if ((isNaN(currentSettings[gameName][setting]) &&
|
||||
(parseInt(opt.value, 10) === parseInt(currentSettings[gameName][setting]))) ||
|
||||
(opt.value === currentSettings[gameName][setting]))
|
||||
{
|
||||
option.selected = true;
|
||||
}
|
||||
select.appendChild(option);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends 'pageWrapper.html' %}
|
||||
|
||||
{% block head %}
|
||||
<title>A Link to the Past Settings</title>
|
||||
<title>{{ game }} Settings</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename="styles/zelda3/player-settings.css") }}" />
|
||||
<script type="application/ecmascript" src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||||
<script type="application/ecmascript" src="{{ url_for('static', filename="assets/js-yaml.min.js") }}"></script>
|
||||
|
|
Loading…
Reference in New Issue