website-v2 icon indicating copy to clipboard operation
website-v2 copied to clipboard

Docs issues

Open mxmou opened this issue 4 years ago • 4 comments

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://extensions after doing any changes to your addon." Refreshing the extension is only necessary when changing the addon.json file 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 addon to those functions as parameters.
  • The documentation for userscripts says "Userscripts run after the Scratch page has fully loaded - in other words, they run in defer mode," which is only true if "runAtComplete" is true.
  • The documentation for userstyles should say "Debugging userstyles", not "Debugging userscripts".

mxmou avatar Jun 23 '21 18:06 mxmou

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?)

Hans5958 avatar Jun 30 '21 14:06 Hans5958

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?

WorldLanguages avatar Jan 09 '23 17:01 WorldLanguages

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.

mxmou avatar Jan 09 '23 18:01 mxmou

I believe all will be resolved after #311 is done

WorldLanguages avatar Mar 13 '23 15:03 WorldLanguages