From a4291f561d5002a0d91e0eac1058b5678523f29a Mon Sep 17 00:00:00 2001
From: LilyMakesThings <127533508+LilyMakesThings@users.noreply.github.com>
Date: Tue, 8 Aug 2023 02:38:51 +0100
Subject: [PATCH] Add experimental Lily/AllMenus extension (#510)
---
extensions/Lily/AllMenus.js | 52 +++++++++++++++++++++++++++++++++++++
website/index.ejs | 6 +++++
2 files changed, 58 insertions(+)
create mode 100644 extensions/Lily/AllMenus.js
diff --git a/extensions/Lily/AllMenus.js b/extensions/Lily/AllMenus.js
new file mode 100644
index 0000000000..b81746d39b
--- /dev/null
+++ b/extensions/Lily/AllMenus.js
@@ -0,0 +1,52 @@
+(function (Scratch) {
+ 'use strict';
+
+ var blockXML;
+ const blacklist = ['looks_costumenumbername', 'extension_wedo_tilt_menu'];
+
+ Scratch.vm.addListener('BLOCKSINFO_UPDATE', refreshMenus);
+
+ function refreshMenus() {
+ if (!window.ScratchBlocks) return;
+ Scratch.vm.removeListener('BLOCKSINFO_UPDATE', refreshMenus);
+
+ let allBlocks = Object.keys(ScratchBlocks.Blocks);
+
+ allBlocks = allBlocks.filter(
+ item => item.includes('menu') &&
+ !blacklist.includes(item)
+ );
+
+ const menuBlocks = allBlocks.map(
+ item => '
A few adapter blocks. Created by TrueFantom.
+Special category with every menu from every Scratch category and extensions. Created by LilyMakesThings
+