Skip to content

Commit

Permalink
text.js -- remove "surround" block
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkPool-SP authored Dec 28, 2024
1 parent f70bfc9 commit 8e92f74
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions extensions/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,6 @@
},
},
},
{
opcode: "surround",
blockType: Scratch.BlockType.REPORTER,
text: Scratch.translate("surround [TEXT] with [QUOTE]"),
arguments: {
TEXT: {
type: Scratch.ArgumentType.STRING,
defaultValue: "apple",
},
QUOTE: {
type: Scratch.ArgumentType.STRING,
menu: "QUOTES",
},
},
},

"---",

Expand Down Expand Up @@ -475,10 +460,6 @@
acceptReporters: true,
items: this._initCaseMenu(),
},
quotes: {
acceptReporters: true,
items: ['"', "'", "`", "-", "*", "()", "{}", "[]", "<>", "^$"],
},
positions: {
acceptReporters: true,
items: [
Expand Down Expand Up @@ -787,15 +768,6 @@
return string;
}
}
surround(args) {
if (args.QUOTE.length == 0) {
return args.TEXT;
} else if (args.QUOTE.length == 1) {
return args.QUOTE + args.TEXT + args.QUOTE;
} else if (args.QUOTE.length > 1) {
return args.QUOTE[0] + args.TEXT + args.QUOTE[1];
}
}
posWith(args) {
const STRING = args.STRING.toString();
const SUBSTRING = args.SUBSTRING.toString();
Expand Down

0 comments on commit 8e92f74

Please sign in to comment.