Spaces:
Runtime error
Runtime error
Update src/addons/addons/block-switching/userscript.js
Browse files
src/addons/addons/block-switching/userscript.js
CHANGED
|
@@ -871,6 +871,14 @@ export default async function ({ addon, console, msg }) {
|
|
| 871 |
})
|
| 872 |
})
|
| 873 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 874 |
}
|
| 875 |
|
| 876 |
if (addon.settings.get("sa")) {
|
|
|
|
| 871 |
})
|
| 872 |
})
|
| 873 |
}
|
| 874 |
+
vm.runtime.on("EXTENSION_ADDED", () => {
|
| 875 |
+
const switches = vm.extensionManager.getAddonBlockSwitches();
|
| 876 |
+
Object.getOwnPropertyNames(switches).forEach(extID => {
|
| 877 |
+
Object.getOwnPropertyNames(switches[extID]).forEach(block => {
|
| 878 |
+
blockSwitches[`${extID}_${block}`] = switches[extID][block];
|
| 879 |
+
})
|
| 880 |
+
})
|
| 881 |
+
})
|
| 882 |
}
|
| 883 |
|
| 884 |
if (addon.settings.get("sa")) {
|