Skip to content

Commit

Permalink
menu hotfix
Browse files Browse the repository at this point in the history
limit select menu handler to only player-select menus
  • Loading branch information
MouseyPounds committed Apr 4, 2024
1 parent b31c87b commit 8311401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ <h3>Enchantments</h3>
<p>Pan enchantments were only introduced in Stardew 1.6 but will show for all versions.</p>
<p class="note" id="enchant-note"></p>
<fieldset id="enchant-player">
Select Player: <select id="enchant-player-select">
Select Player: <select id="enchant-player-select" class="player">
</select><br />
</fieldset>
<fieldset id="enchant-buttons"><div class="buttons">
Expand Down Expand Up @@ -430,7 +430,7 @@ <h3>Prize Ticket Machine</h3>
<p>If the result is "Raccoon Seeds" the type of seed is the same as you would get from seed dig spots on that day. Possibilities include Carrot, Summer Squash, Broccoli, and Powdermelon.</p>
<p class="note" id="prize-note"></p>
<fieldset id="prize-player">
Select Player: <select id="prize-player-select">
Select Player: <select id="prize-player-select" class="player">
</select><br />
</fieldset>
<!--
Expand Down
3 changes: 2 additions & 1 deletion stardew-predictor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3966,6 +3966,7 @@ window.onload = function () {
var field = element.id.split('-');
var tab = field[0];
var offset = Number($("#" + tab + "-next").val()) - 20;
console.log("select handler for tab " + tab + " offset " + offset);
updateTab(tab, false, offset);
}

Expand Down Expand Up @@ -9035,7 +9036,7 @@ Object.keys(test).forEach(function(key, index) { if (test[key].s > 0 && test[key
e.preventDefault();
searchHandler(this);
} });
$("select").change(function () { selectHandler(this); });
$("select[class='player']").change(function () { selectHandler(this); });
$("button").prop('disabled',false);
}

Expand Down

0 comments on commit 8311401

Please sign in to comment.