Skip to content

Commit 5e8af91

Browse files
committed
fmt
1 parent 25f4776 commit 5e8af91

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/html/templates/script.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ function findParent(el, find) {
77
}
88

99
document.addEventListener("click", (e) => {
10-
const target = findParent(e.target, (el) => el instanceof HTMLButtonElement && el.dataset["copy"]);
10+
const target = findParent(
11+
e.target,
12+
(el) => el instanceof HTMLButtonElement && el.dataset["copy"],
13+
);
1114
if (target) {
1215
navigator?.clipboard?.writeText(target.dataset["copy"]);
1316
}
@@ -16,8 +19,12 @@ document.addEventListener("click", (e) => {
1619
window.addEventListener("load", () => {
1720
const checkbox = document.getElementById("usageDropdownInput");
1821
document.addEventListener("mouseup", (e) => {
19-
const label = findParent(e.target, (el) => el instanceof HTMLLabelElement && el.htmlFor === "usageDropdownInput");
20-
if(!label) {
22+
const label = findParent(
23+
e.target,
24+
(el) =>
25+
el instanceof HTMLLabelElement && el.htmlFor === "usageDropdownInput",
26+
);
27+
if (!label) {
2128
checkbox.checked = false;
2229
}
2330
});

0 commit comments

Comments
 (0)