mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-10 01:05:29 +00:00
Lints for the Linter god
This commit is contained in:
parent
055cced75b
commit
5f584c1403
1 changed files with 7 additions and 2 deletions
|
@ -26,8 +26,10 @@ let StatusCache = new class {
|
||||||
// Used in set reading goal
|
// Used in set reading goal
|
||||||
let key = event.target.dataset.cacheDraft;
|
let key = event.target.dataset.cacheDraft;
|
||||||
let value = event.target.value;
|
let value = event.target.value;
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
window.localStorage.removeItem(key);
|
window.localStorage.removeItem(key);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +46,7 @@ let StatusCache = new class {
|
||||||
// Used in set reading goal
|
// Used in set reading goal
|
||||||
let key = node.dataset.cacheDraft;
|
let key = node.dataset.cacheDraft;
|
||||||
let value = window.localStorage.getItem(key);
|
let value = window.localStorage.getItem(key);
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -75,13 +78,15 @@ let StatusCache = new class {
|
||||||
|
|
||||||
// Close modals
|
// Close modals
|
||||||
let modal = form.closest(".modal.is-active");
|
let modal = form.closest(".modal.is-active");
|
||||||
if (!!modal) {
|
|
||||||
|
if (modal) {
|
||||||
modal.getElementsByClassName("modal-close")[0].click();
|
modal.getElementsByClassName("modal-close")[0].click();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close reply panel
|
// Close reply panel
|
||||||
let reply = form.closest(".reply-panel");
|
let reply = form.closest(".reply-panel");
|
||||||
if (!!reply) {
|
|
||||||
|
if (reply) {
|
||||||
document.querySelector("[data-controls=" + reply.id + "]").click();
|
document.querySelector("[data-controls=" + reply.id + "]").click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue