Skip to content

Commit 2bb67e1

Browse files
committed
Add missing semicolons and trim whitespace
1 parent 2a9115c commit 2bb67e1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/_static/script.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ function getRandomInt(max) {
55
return Math.floor(Math.random() * max);
66
}
77

8-
document.addEventListener("DOMContentLoaded", function(event) {
8+
document.addEventListener("DOMContentLoaded", function(event) {
99
const tabs = document.querySelectorAll('[role="tab"]');
1010
const tabList = document.querySelector('[role="tablist"]');
1111

1212
// set currently active tab to 0
13-
tabList.setAttribute("data-current-tab", 0)
13+
tabList.setAttribute("data-current-tab", 0);
1414

1515
// Add a click event handler to each tab
1616
tabs.forEach((tab, i) => {
1717
tab.addEventListener("click", changeTabs);
18-
tab.setAttribute("data-tab-count", i)
18+
tab.setAttribute("data-tab-count", i);
1919
});
2020

2121
// Enable arrow navigation between tabs in the tab list
@@ -47,7 +47,7 @@ document.addEventListener("DOMContentLoaded", function(event) {
4747

4848
///////////////////////////////////////
4949
// rotate images in images-rotate directory:
50-
var ind = getRandomInt(images_rotate.length);
50+
var ind = getRandomInt(images_rotate.length);
5151
var info = images_rotate[ind];
5252
var img_src = "_static/images-rotate/" + info.image;
5353
var caption = info.caption;
@@ -66,7 +66,7 @@ function changeTabs(e) {
6666
const grandparent = parent.parentNode;
6767

6868
// set attribute for currently active tab for setting the location of the pointer triangle
69-
parent.setAttribute("data-current-tab", e.target.getAttribute("data-tab-count"))
69+
parent.setAttribute("data-current-tab", e.target.getAttribute("data-tab-count"));
7070

7171
// Remove all current selected tabs
7272
parent
@@ -86,4 +86,3 @@ function changeTabs(e) {
8686
.querySelector(`#${target.getAttribute("aria-controls")}`)
8787
.removeAttribute("hidden");
8888
}
89-

0 commit comments

Comments
 (0)