Skip to content

Commit 3747916

Browse files
Update automatic switch
1 parent 8097639 commit 3747916

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ <h1>Histórico de Partidas</h1>
124124
src="https://code.jquery.com/jquery-3.7.1.min.js"
125125
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
126126
crossorigin="anonymous"></script>
127-
<script src="./index.js?v=8"></script>
127+
<script src="./index.js?v=9"></script>
128128
<script>
129129
if('serviceWorker' in navigator) {
130130
navigator.serviceWorker.register('./serviceWorker.js', { scope: '/peladaManager/' });

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ $("#start-match-day").click(function() {
256256
$("#update-match-day").click(function() {
257257
maxPoints = parseInt($("#max-points").val());
258258
playersPerTeam = $("#players-per-team").val();
259+
260+
if ($("#auto-switch-teams").is(":checked")) autoSwitchTeamsPoints = parseInt($("#auto-switch-teams-points").val());
261+
else autoSwitchTeamsPoints = 0;
259262

260263
if (playersPerTeam * 2 > players.length) {
261264
alert("Sem jogadores suficientes para atualizar a partida.");

0 commit comments

Comments
 (0)