Skip to content

Commit 3236b75

Browse files
authored
Default To Bitmap
1 parent 4f1bc7b commit 3236b75

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

features/bitmap-default/data.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "Default to Bitmap",
3+
"description": "Automatically switches to bitmap mode in the costume editor when opened.",
4+
"credits": [
5+
{ "username": "MaterArc", "url": "https://scratch.mit.edu/users/MaterArc/" }
6+
],
7+
"type": ["Editor"],
8+
"tags": ["New", "Featured"],
9+
"dynamic": true,
10+
"scripts": [{ "file": "script.js", "runOn": "/editor/*" }]
11+
}
12+

features/bitmap-default/script.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default async function ({ feature, console }) {
2+
ScratchTools.waitForElements(".paint-editor_bitmap-button_OEHDO", (bitmapButton) => {
3+
if (feature.self.enabled) {
4+
bitmapButton.click();
5+
}
6+
});
7+
}
8+

0 commit comments

Comments
 (0)