Update addons
This commit is contained in:
7 files changed
+36
-9
No files matched your search
@@ -73,7 +73,9 @@ export default async ({ addon, console, msg }) => {
|
||||
// wait for color dialog box appearance
|
||||
const element = await addon.tab.waitForElement('div[class*="color-picker_swatch-row"]', {
|
||||
markAsSeen: true,
|
||||
condition: () => addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 1,
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 1 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
});
|
||||
rateLimiter.abort(false);
|
||||
|
||||
|
||||
@@ -44,7 +44,12 @@ export default async ({ addon, console, msg }) => {
|
||||
element.click();
|
||||
};
|
||||
while (true) {
|
||||
const element = await addon.tab.waitForElement("button.scratchEyedropper", { markAsSeen: true });
|
||||
const element = await addon.tab.waitForElement("button.scratchEyedropper", {
|
||||
markAsSeen: true,
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 0 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
});
|
||||
rateLimiter.abort(false);
|
||||
if (addon.tab.editorMode !== "editor") continue;
|
||||
addon.tab.redux.initialize();
|
||||
|
||||
@@ -48,7 +48,9 @@ export default async ({ addon, console, msg }) => {
|
||||
while (true) {
|
||||
const element = await addon.tab.waitForElement('div[class*="color-picker_swatch-row"]', {
|
||||
markAsSeen: true,
|
||||
condition: () => addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 1,
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 1 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
});
|
||||
rateLimiter.abort(false);
|
||||
addon.tab.redux.initialize();
|
||||
|
||||
@@ -171,7 +171,13 @@ export default async function ({ addon, global, console }) {
|
||||
}
|
||||
|
||||
function findBlocklyDropDownDiv() {
|
||||
return addon.tab.waitForElement(".blocklyDropDownDiv").then(() => document.querySelector(".blocklyDropDownDiv"));
|
||||
return addon.tab
|
||||
.waitForElement(".blocklyDropDownDiv", {
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 0 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
})
|
||||
.then(() => document.querySelector(".blocklyDropDownDiv"));
|
||||
}
|
||||
|
||||
blocklyDropDownDiv = await findBlocklyDropDownDiv();
|
||||
|
||||
@@ -1297,7 +1297,11 @@ export default async function ({ addon, global, console, msg }) {
|
||||
|
||||
// Sprite list
|
||||
{
|
||||
const spriteSelectorItemElement = await addon.tab.waitForElement("[class*='sprite-selector_sprite-wrapper']");
|
||||
const spriteSelectorItemElement = await addon.tab.waitForElement("[class*='sprite-selector_sprite-wrapper']", {
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 0 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
});
|
||||
vm = addon.tab.traps.vm;
|
||||
reactInternalKey = Object.keys(spriteSelectorItemElement).find((i) => i.startsWith(REACT_INTERNAL_PREFIX));
|
||||
const sortableHOCInstance = getSortableHOCFromElement(spriteSelectorItemElement);
|
||||
@@ -1313,7 +1317,11 @@ export default async function ({ addon, global, console, msg }) {
|
||||
|
||||
// Backpack
|
||||
(async () => {
|
||||
const backpackContainer = await addon.tab.waitForElement("[class*='backpack_backpack-list_']");
|
||||
const backpackContainer = await addon.tab.waitForElement("[class*='backpack_backpack-list_']", {
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 0 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
});
|
||||
const backpackInstance = getBackpackFromElement(backpackContainer);
|
||||
verifyBackpack(backpackInstance);
|
||||
patchBackpack(backpackInstance);
|
||||
@@ -1322,7 +1330,9 @@ export default async function ({ addon, global, console, msg }) {
|
||||
// Costume and sound list
|
||||
{
|
||||
const selectorListItem = await addon.tab.waitForElement("[class*='selector_list-item']", {
|
||||
condition: () => addon.tab.redux.state.scratchGui.editorTab.activeTabIndex !== 0,
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex !== 0 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
});
|
||||
const sortableHOCInstance = getSortableHOCFromElement(selectorListItem);
|
||||
verifySortableHOC(sortableHOCInstance);
|
||||
|
||||
@@ -732,7 +732,9 @@ export default async function ({ addon, global, console, msg }) {
|
||||
while (true) {
|
||||
const canvasControls = await addon.tab.waitForElement("[class^='paint-editor_canvas-controls']", {
|
||||
markAsSeen: true,
|
||||
condition: () => addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 1,
|
||||
condition: () =>
|
||||
addon.tab.redux.state.scratchGui.editorTab.activeTabIndex === 1 &&
|
||||
!addon.tab.redux.state.scratchGui.mode.isPlayerOnly,
|
||||
});
|
||||
accessScratchInternals();
|
||||
const zoomControlsContainer = canvasControls.querySelector("[class^='paint-editor_zoom-controls']");
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":"1.12.1","commit":"9c80149","languages":["ar","de","en","es","fr","id","it","ja","nl","pl","pt-br","ro","ru","sl","th","tr"]}
|
||||
{"version":"1.12.1","commit":"1ba05f3","languages":["ar","de","en","es","fr","id","it","ja","nl","pl","pt-br","ro","ru","sl","th","tr"]}
|
||||
Reference in new issue
Block a user