Skip to content

Commit

Permalink
Add timestamps to sound links to break caching (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpp committed Oct 3, 2024
1 parent 1d904b6 commit 144cf30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webroot/template/general-settings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<div id="custom-pew-existing" class="border border-light bg-dark px-2 py-1 my-2">
<button type="button" class="btn btn-sm btn-danger" onclick="$('#custom-pew-new').removeClass('d-none'),$(this.parentNode).remove()">🗙</button>
{{settings.custom_pew_file}}
<a href="#" onclick="(new Audio('sound/{{ settings.custom_pew_file }}')).play(); return false" class="align-text-top">
<a href="#" onclick="(new Audio('sound/{{ settings.custom_pew_file }}?h=' + (new Date().getTime()))).play(); return false" class="align-text-top">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-volume-up" viewBox="0 0 16 16">
<path d="M11.536 14.01A8.47 8.47 0 0 0 14.026 8a8.47 8.47 0 0 0-2.49-6.01l-.708.707A7.48 7.48 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303z"/>
<path d="M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.48 5.48 0 0 1 11.025 8a5.48 5.48 0 0 1-1.61 3.89z"/>
Expand Down
2 changes: 1 addition & 1 deletion webroot/template/numerology-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<div id="num-sound-file-existing" class="border bg-light px-2 py-1 my-2" style="border-color: #ced4da">
<button type="button" class="btn btn-sm btn-danger" onclick="$('#num-sound-file-new').removeClass('d-none'),$(this.parentNode).remove()">🗙</button>
{{numerology.sound_file}}
<a href="#" onclick="(new Audio('sound/{{ numerology.sound_file }}')).play(); return false" class="align-text-top">
<a href="#" onclick="(new Audio('sound/{{ numerology.sound_file }}?h=' + (new Date().getTime()))).play(); return false" class="align-text-top">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-volume-up" viewBox="0 0 16 16">
<path d="M11.536 14.01A8.47 8.47 0 0 0 14.026 8a8.47 8.47 0 0 0-2.49-6.01l-.708.707A7.48 7.48 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303z"/>
<path d="M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.48 5.48 0 0 1 11.025 8a5.48 5.48 0 0 1-1.61 3.89z"/>
Expand Down
2 changes: 1 addition & 1 deletion webroot/template/numerology-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</td>
<td class="align-middle">
{{#if sound_file}}
<a href="#" onclick="(new Audio('sound/{{ sound_file }}')).play(); return false">
<a href="#" onclick="(new Audio('sound/{{ sound_file }}?h=' + (new Date().getTime()))).play(); return false">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-volume-up" viewBox="0 0 16 16">
<path d="M11.536 14.01A8.47 8.47 0 0 0 14.026 8a8.47 8.47 0 0 0-2.49-6.01l-.708.707A7.48 7.48 0 0 1 13.025 8c0 2.071-.84 3.946-2.197 5.303z"/>
<path d="M10.121 12.596A6.48 6.48 0 0 0 12.025 8a6.48 6.48 0 0 0-1.904-4.596l-.707.707A5.48 5.48 0 0 1 11.025 8a5.48 5.48 0 0 1-1.61 3.89z"/>
Expand Down

0 comments on commit 144cf30

Please sign in to comment.