Skip to content

Commit 2c78c5f

Browse files
committed
Merge branch 'is-editor-block' of https://github.com/Valmontechno/ScratchAddons into is-editor-block
2 parents 5cbfc84 + a742be4 commit 2c78c5f

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

addon-api/content-script/blocks.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,8 @@ const generateBlockXML = () => {
151151
` argumentids="${escapeHTML(JSON.stringify(ids))}"` +
152152
` argumentdefaults="${escapeHTML(JSON.stringify(defaults))}"` +
153153
"></mutation></block>";
154-
155154
} else {
156-
xml +=
157-
`<block type="${blockData.type}"><field name="VALUE">${blockData.id}</field></block>`;
155+
xml += `<block type="${blockData.type}"><field name="VALUE">${blockData.id}</field></block>`;
158156
}
159157
}
160158
if (xml.length === 0) {
@@ -202,7 +200,7 @@ const injectWorkspace = (ScratchBlocks) => {
202200
if (this.type === "procedures_call") {
203201
block = this.procCode_ && getCustomBlock(this.procCode_);
204202
} else if (this.type === "argument_reporter_string_number" || this.type === "argument_reporter_boolean") {
205-
const name = this.inputList[0].fieldRow[0].text_
203+
const name = this.inputList[0].fieldRow[0].text_;
206204
block = name && getCustomBlock(name);
207205
}
208206
const color = ScratchBlocks.Colours.text === "#000000" ? highContrastColor : defaultColor;
@@ -351,17 +349,17 @@ export async function init(tab) {
351349
if (blockData) {
352350
return blockData.handler();
353351
}
354-
return oldArgumentReporterStringNumber.call(this, args, util)
355-
}
352+
return oldArgumentReporterStringNumber.call(this, args, util);
353+
};
356354

357355
const oldArgumentReporterBoolean = vm.runtime._primitives.argument_reporter_boolean;
358356
vm.runtime._primitives.argument_reporter_boolean = (args, util) => {
359357
const blockData = getCustomBlock(args.VALUE);
360358
if (blockData) {
361359
return blockData.handler(args, util);
362360
}
363-
return oldArgumentReporterBoolean.call(this, args, util)
364-
}
361+
return oldArgumentReporterBoolean.call(this, args, util);
362+
};
365363

366364
const ScratchBlocks = await tab.traps.getBlockly();
367365
injectWorkspace(ScratchBlocks);

addons/debugger/userscript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default async function ({ addon, console, msg }) {
7171
addon.tab.addReporterBlock("\u200B\u200Bis in editor?\u200B\u200B", true, {
7272
callback: () => {
7373
return document.body.classList.contains("sa-body-editor") ? true : 0;
74-
}
74+
},
7575
});
7676

7777
const vm = addon.tab.traps.vm;

0 commit comments

Comments
 (0)