Conversation
|
Nice PR! The main script folder is being standardised with the App Store being finalised. It would be better to use this to get the main JS script path since all App Store apps will install into firmware/src/modules/bjs_interpreter/interpreter.cpp Lines 164 to 184 in 58d9664 |
|
Rather than adding them via the JS Interpreter script menu (and adding an extra button press when launching non-pinned apps) it would better placed implmenting like the firmware/src/core/settings.cpp Lines 1202 to 1228 in 58d9664 |
|
@emericklaw added your suggested changes and moved the dynamicjs class in /modules |
|
I believe that these files: should be placed at: |

Added a way to pin custom JS scripts directly to the main home screen. Instead of digging through the Scripts app every time you want to use a favorite tool, you can now just pin it to the main carousel.
When you select a script, instead of just running it immediately, it now opens a small submenu with:
Under the hood, I added a DynamicJSApp class in main_menu.cpp. It scans the /apps folder and dynamically generates menu items for whatever it finds there, injecting them straight into the main menu.
Types of Changes
Verification
Upload a .js file to /scripts via the WebUI.
Open JS Interpreter on the device.
Click your script and select Pin to Home.
Back out to the main menu—you'll see your script right there in the carousel.
Go back to JS Interpreter,click the same script, and hit Unpin from Home. Back out to the main menu and it's gone.
Testing
Tested manually on my board using LittleFS.