Docs issues
Some things I noticed in the docs that should probably be changed:
- The word "addon types" should not be used the way it is right now, because one addon can have all of the different "types".
- Every article in the "Addon Types" section says "Make sure to refresh Scratch Addons from
chrome://extensionsafter doing any changes to your addon." Refreshing the extension is only necessary when changing theaddon.jsonfile or a persistent script, not userscripts or userstyles. - "For persistent scripts, you must wrap all your code inside a function looking like this [...] If you want to write your own functions to have cleaner code, you should include them inside the main function" and something similar for userscripts. This is not true: the async function is the script's entry point, but putting some code (variable or function definitions) outside it doesn't cause problems. You just need to pass objects like
addonto those functions as parameters. - The documentation for userscripts says "Userscripts run after the Scratch page has fully loaded - in other words, they run in
defermode," which is only true if"runAtComplete"is true. - The documentation for userstyles should say "Debugging userstyles", not "Debugging userscripts".
Anyone who understands the current underlying system may do changes with the docs, as I can't guarantee whether what I write will be correct.
cc @WorldLanguages (should I tag you for each docs issue?)
The word "addon types" should not be used the way it is right now, because one addon can have all of the different "types".
What do you think would be a best name?
The word "addon types" should not be used the way it is right now, because one addon can have all of the different "types".
What do you think would be a best name?
Persistent scripts no longer exist so I think "userscripts and userstyles" would be good enough.
I believe all will be resolved after #311 is done