Skip to content

Commit 731a9d3

Browse files
authored
Merge pull request #979 from MaterArc/remove-confirmation
Remove Delete Confirmation
2 parents 2d3af54 + 9cdbc26 commit 731a9d3

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

features/features.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
[
2+
{
3+
"version": 2,
4+
"id": "remove-confirmation",
5+
"versionAdded": "v4.0.0"
6+
},
27
{
38
"version": 2,
49
"id": "outline-shape-options",
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)