Skip to content

Commit b35118f

Browse files
authored
Remove Confirmation
Remove the new sprite confirmation feature from Scratch
1 parent 4f1bc7b commit b35118f

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"title": "Remove Delete Confirmation",
3+
"description": "Removes the delete confirmation prompt when deleting sprites in the Scratch editor.",
4+
"credits": [
5+
{ "username": "MaterArc", "url": "https://scratch.mit.edu/users/MaterArc/" }
6+
],
7+
"type": ["Editor"],
8+
"tags": ["New", "Featured"],
9+
"dynamic": true,
10+
"styles": [{ "file": "style.css", "runOn": "/editor/*" }],
11+
"scripts": [{ "file": "script.js", "runOn": "/editor/*" }]
12+
}
13+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default async function ({ feature, console }) {
2+
ScratchTools.waitForElements("body", () => {
3+
document.body.addEventListener("click", () => {
4+
ScratchTools.waitForElements(
5+
"[class^='delete-confirmation-prompt_ok-button_']",
6+
(confirmButton) => {
7+
if (feature.self.enabled) confirmButton.click();
8+
}
9+
);
10+
});
11+
});
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[class*="delete-confirmation-prompt_modal-container"] {
2+
visibility: hidden;
3+
}
4+

0 commit comments

Comments
 (0)