Skip to content

Commit 60cda00

Browse files
committed
updates js syntax
1 parent 5d3acd9 commit 60cda00

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/assets/javascripts/bookmark-modal.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
document.addEventListener("DOMContentLoaded", function () {
2-
const focusableElements = 'input, .btn, .close'
3-
const modal = document.querySelector('#bookmark-dialog');
4-
const firstFocusableElement = modal.querySelectorAll(focusableElements)[0];
5-
const focusableContent = modal.querySelectorAll(focusableElements);
6-
const lastFocusableElement = focusableContent[focusableContent.length - 1];
7-
const shareViewButton = document.querySelector(".action-bookmark")
2+
var focusableElements = 'input, .btn, .close'
3+
var modal = document.querySelector('#bookmark-dialog');
4+
var firstFocusableElement = modal.querySelectorAll(focusableElements)[0];
5+
var focusableContent = modal.querySelectorAll(focusableElements);
6+
var lastFocusableElement = focusableContent[focusableContent.length - 1];
7+
var shareViewButton = document.querySelector(".action-bookmark")
88

99
function onModalOpen() {
1010
document.addEventListener('keydown', function(e) {

0 commit comments

Comments
 (0)