Only show button when closed

This commit is contained in:
pythongosssss
2024-10-23 20:35:45 +01:00
parent 99e7bf7284
commit 1ca249fcb8
+9 -2
View File
@@ -232,6 +232,7 @@ app.registerExtension({
content: "Show Image Feed 🐍",
});
showMenuButton.enabled = false;
showMenuButton.element.style.display = "none";
app.menu.settingsGroup.append(showMenuButton);
}
@@ -391,7 +392,10 @@ Recommended: "enabled (max performance)" uness images are erroneously deduplicat
onclick: () => {
imageFeed.style.display = "none";
showButton.style.display = feedLocation.value === "hidden" ? "none" : "unset";
if (showMenuButton) showMenuButton.enabled = true;
if (showMenuButton) {
showMenuButton.enabled = true;
showMenuButton.element.style.display = "";
}
saveVal("Visible", 0);
visible = false;
window.dispatchEvent(new Event("resize"));
@@ -502,7 +506,10 @@ Recommended: "enabled (max performance)" uness images are erroneously deduplicat
showButton.onclick = () => {
imageFeed.style.display = "flex";
showButton.style.display = "none";
if (showMenuButton) showMenuButton.enabled = false;
if (showMenuButton) {
showMenuButton.enabled = false;
showMenuButton.element.style.display = "none";
}
saveVal("Visible", 1);
visible = true;