mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-16 19:15:16 +00:00
run prettier on bookwyrm.js
This commit is contained in:
parent
9a30a3656a
commit
5d3883c9a0
1 changed files with 10 additions and 10 deletions
|
@ -49,7 +49,7 @@ let BookWyrm = new (class {
|
||||||
document
|
document
|
||||||
.querySelectorAll('form[name="register"]')
|
.querySelectorAll('form[name="register"]')
|
||||||
.forEach((form) =>
|
.forEach((form) =>
|
||||||
form.addEventListener("submit", (e) => this.setPreferredTimezone(e, form))
|
form.addEventListener("submit", (e) => this.setPreferredTimezone(e, form)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ let BookWyrm = new (class {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
delay,
|
delay,
|
||||||
counter
|
counter,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,8 +196,8 @@ let BookWyrm = new (class {
|
||||||
.forEach((otherTrigger) =>
|
.forEach((otherTrigger) =>
|
||||||
otherTrigger.setAttribute(
|
otherTrigger.setAttribute(
|
||||||
"aria-pressed",
|
"aria-pressed",
|
||||||
otherTrigger.getAttribute("aria-pressed") === "false"
|
otherTrigger.getAttribute("aria-pressed") === "false",
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// @todo Find a better way to handle the exception.
|
// @todo Find a better way to handle the exception.
|
||||||
|
@ -331,8 +331,8 @@ let BookWyrm = new (class {
|
||||||
bookwyrm.addRemoveClass(
|
bookwyrm.addRemoveClass(
|
||||||
relatedForm,
|
relatedForm,
|
||||||
"is-hidden",
|
"is-hidden",
|
||||||
relatedForm.className.indexOf("is-hidden") == -1
|
relatedForm.className.indexOf("is-hidden") == -1,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
this.ajaxPost(form).catch((error) => {
|
this.ajaxPost(form).catch((error) => {
|
||||||
|
@ -530,7 +530,7 @@ let BookWyrm = new (class {
|
||||||
copyWithTooltip(copyButtonEl) {
|
copyWithTooltip(copyButtonEl) {
|
||||||
const text = document.getElementById(copyButtonEl.dataset.contentId).innerHTML;
|
const text = document.getElementById(copyButtonEl.dataset.contentId).innerHTML;
|
||||||
const tooltipEl = document.getElementById(copyButtonEl.dataset.tooltipId);
|
const tooltipEl = document.getElementById(copyButtonEl.dataset.tooltipId);
|
||||||
|
|
||||||
copyButtonEl.addEventListener("click", () => {
|
copyButtonEl.addEventListener("click", () => {
|
||||||
navigator.clipboard.writeText(text);
|
navigator.clipboard.writeText(text);
|
||||||
tooltipEl.style.visibility = "visible";
|
tooltipEl.style.visibility = "visible";
|
||||||
|
@ -621,7 +621,7 @@ let BookWyrm = new (class {
|
||||||
"select:not([disabled])",
|
"select:not([disabled])",
|
||||||
"details:not([disabled])",
|
"details:not([disabled])",
|
||||||
'[tabindex]:not([tabindex="-1"]):not([disabled])',
|
'[tabindex]:not([tabindex="-1"]):not([disabled])',
|
||||||
].join(",")
|
].join(","),
|
||||||
);
|
);
|
||||||
const firstFocusableEl = focusableEls[0];
|
const firstFocusableEl = focusableEls[0];
|
||||||
const lastFocusableEl = focusableEls[focusableEls.length - 1];
|
const lastFocusableEl = focusableEls[focusableEls.length - 1];
|
||||||
|
@ -726,7 +726,7 @@ let BookWyrm = new (class {
|
||||||
|
|
||||||
toggleStatus("scanning");
|
toggleStatus("scanning");
|
||||||
Quagga.start();
|
Quagga.start();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -749,7 +749,7 @@ let BookWyrm = new (class {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
parseInt(drawingCanvas.getAttribute("width")),
|
parseInt(drawingCanvas.getAttribute("width")),
|
||||||
parseInt(drawingCanvas.getAttribute("height"))
|
parseInt(drawingCanvas.getAttribute("height")),
|
||||||
);
|
);
|
||||||
result.boxes
|
result.boxes
|
||||||
.filter((box) => box !== result.box)
|
.filter((box) => box !== result.box)
|
||||||
|
|
Loading…
Reference in a new issue