Skip to content

Commit

Permalink
const instead of var
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSeverinsen committed Apr 19, 2024
1 parent 199a748 commit ffe08fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/templates/secrets_admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
{% endfor %}
</table>
<script>
var copyButtons = document.getElementsByClassName('copyButton');
const copyButtons = document.getElementsByClassName('copyButton');
for(var index=0; index < copyButtons.length; index++){
var element = copyButtons[index];
const element = copyButtons[index];
element.addEventListener('click', function(){
var parent = element.parentElement;
var text = parent.firstElementChild.textContent;
const parent = element.parentElement;
const text = parent.firstElementChild.textContent;
navigator.clipboard.writeText(text).then(() => {
/* Resolved - text copied to clipboard successfully */
},() => {
Expand Down

0 comments on commit ffe08fb

Please sign in to comment.