Skip to content

Commit 98a4bf8

Browse files
Merge pull request #18 from isaacbatst/fix/cache-renaming-scripts
fix: rename scripts to avoid cache
2 parents d6d7ec2 + 239ce39 commit 98a4bf8

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,12 @@ <h1>Histórico de Partidas</h1>
252252
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
253253
crossorigin="anonymous"></script>
254254
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js"></script>
255-
<script type="module" src="./index.js?v=17"></script>
255+
<script type="module" src="./script.js?v=17"></script>
256256
<script>
257257
const options = window.location.hostname.includes('localhost') || window.location.hostname.includes('ngrok-free.app')
258258
? undefined : { scope: '/peladaManager/' };
259259
if('serviceWorker' in navigator) {
260-
navigator.serviceWorker.register('./serviceWorker.js', options)
260+
navigator.serviceWorker.register('./service-worker.js', options)
261261
.then(function(registration) {
262262
console.log('Service Worker Registered');
263263
})

index.js script.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ let lastGameDayMatch = 0;
1919
let courtId = null;
2020
const localStorage = window.localStorage;
2121
let playersToNextGame = [];
22+
let selectionOrder = [];
2223

2324
const createSpinner = (id) => {
2425
const wrapper = document.createElement('span');
@@ -90,7 +91,6 @@ socket.on('game-day:updated', async () => {
9091
initPlayersSelect(filteredPlayers.sort((a, b) => a.name.localeCompare(b.name)));
9192
})
9293

93-
9494
currentMatchMaxPoints = maxPoints;
9595
updatePlayerList();
9696
$("#new-match-day").hide();
@@ -435,9 +435,6 @@ $("#new-match-day").click(function() {
435435
$("#new-match-day-button").hide();
436436
});
437437

438-
let selectionOrder = [];
439-
440-
441438
$('#add-new-player-select').on('select2:select', function (e) {
442439
selectionOrder.push(e.params.data.text);
443440
});

serviceWorker.js service-worker.js

File renamed without changes.

0 commit comments

Comments
 (0)