Comments (4)
Okay I think the API is working now, wanna try to add your addon?
- Create an
editor-stepping
folder inside theaddons
folder. - Add
"editor-stepping"
toaddons.json
- Add an
addon.json
file to your addon's folder, you can useeditor-devtools
's manifest as a base (IMPORTANT: make sure to setenabled_by_default
to true, so that you don't have to manually enable it inside the background script's console) - Have a
userscript.js
that goes like this:
export default async function({ addon, global, console }) {
const vm = await addon.tab.getScratchVM();
// Do whatever with vm
}
- Reload the extension on
chrome://extensions
and hopefully it works :)
Tag me if you need help.
from scratchaddons.
This "find vm" approach should probably be made by the addon loader so that many addons can access the VM object (and not just this one). Related to #17
from scratchaddons.
@WorldLanguages addon.ScratchVM
?
from scratchaddons.
@BoomerScratch Yeah, it will probably be addon.tab.getScratchVM
(returns a promise) and will resolve when it finds the VM.
from scratchaddons.
Related Issues (20)
- Global Custom Blocks/Procedures HOT 14
- “HD Image Uploads” is exceedingly slow with modified stage size on Safari HOT 3
- ocular addon should respect theme choice HOT 1
- Revisit CWS privacy information
- Permissions page should not be opened by settings-popup to avoid duplication HOT 1
- Filter backpack by category (sprite, script, etc.) or name of the thing
- Multicolored Comments HOT 16
- custom block shape new preset HOT 2
- `old-studio-layout`: "You will be able to edit studios again (...)" modal is oversized on titles HOT 2
- i dont know its cratches fault or this HOT 3
- Webpage Creation HOT 2
- Addons taking a moment to activate if it has been > 30 seconds since last Scratch page visit HOT 8
- `numberpad` + `mediarecorder`: Numberpad clips onto mediarecorder HOT 1
- new addon: fix small stage affecting project page (or switch to large stage before going to project page)
- Addons don't work when running scratch-www locally HOT 4
- Run on `localhost:8602` HOT 3
- Markdown in comment HOT 2
- Revamp `mediarecorder`'s "Start Recording" modal
- Doesn't work on Android Firefox since the recent update HOT 7
- `mediarecorder`: custom shortcut to stop- and start recording HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scratchaddons.