Skip to content

Commit 729b056

Browse files
authored
Dynamic
1 parent 615eb74 commit 729b056

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/bitmap-default/script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ export default async function ({ feature }) {
22
ScratchTools.waitForElements("body", () => {
33
const observer = new MutationObserver(() => {
44
const bitmapButton = document.querySelector(".paint-editor_bitmap-button_OEHDO");
5-
if (bitmapButton && feature.self.enabled) {
5+
if (bitmapButton && feature.self.enabled && !bitmapButton.classList.contains("clicked")) {
66
bitmapButton.click();
7+
bitmapButton.classList.add("clicked");
78
}
89
});
910
observer.observe(document.body, { childList: true, subtree: true });

0 commit comments

Comments
 (0)