How to test?
There are a couple ways to test your module:
You can use node to test your scripts, to install node head over to their official install page.
To test your script, run node in your command line program:
> node {PATH TO FILE}For example:
> node /Users/Test/Downloads/example.jsTo log any constants or errors, you can for example use:
console.log('Raw output:', response);> node /Users/Test/Downloads/example.js
Raw output: example responseconst value = 10;
if (value > 20) {
console.log("Value is greater than 20.");
} else {
console.error("Error: Value is not greater than 20.");
}> node /Users/Test/Downloads/example.js
Error: Value is not greater than 20.To add an example input (testing regex or fetching for example), use:
function search(html){
// Some code
}
search(`html or something idc`);
// WARNING: Use backticks for multi line inputs!async function search(keyword){
const response = await fetch(`https://google.com/${keyword}`)
}
search(`I hate my life`); Huge thanks to @JMcrafter26 for making this website, it simulates Sora's frontend, a great way to quickly test your modules on PC in case you don't own a Mac. The website and FAQ can be found here: https://api.jm26.net/sora-modules/
Get the Sora app for Mac from here.
This is the fastest way to test it in the app, seeing as Github raw often takes some time to update it's faster to directly edit the Sora cached modules.
To add the module to the app, host your java script file and JSON on your preferred file hoster (needs to support viewing the raw file), it is recommended to use GitHub.
Once you've hosted the file, you will need to copy the raw link of the java script file and add it to your JSON, after doing this you will need to copy the raw link of your JSON, which will look something like this:
https://raw.githubusercontent.com/50n50/maisgay/refs/heads/main/hianime/hianime.jsonTo find the cached scripts, head over to this file path on your Mac:
/Users/[Your username]/Library/Containers/me.cranci.Sora/Data/Documents/You will find all the modules there, unfortunately they will have some gibberish name so you will need to which is the one you want to edit. Once you've found it you can easily edit anything you want and restart the Sora app to quickly test the changes.
To test in Sora, you will obviously need to first sideload the app, join the official discord for help if needed!
To add the module to the app, host your java script file and JSON on your preferred file hoster (needs to support viewing the raw file), it is recommended to use GitHub.
Once you've hosted the file, you will need to copy the raw link of the java script file and add it to your JSON, after doing this you will need to copy the raw link of your JSON, which will look something like this:
https://raw.githubusercontent.com/50n50/maisgay/refs/heads/main/hianime/hianime.jsonPlease make sure you are copying the raw link!
After making modifications, remove the module from Sora and restart to app before re-adding it!
Last updated