Correct userScripts / userScripts_legacy index (#579)

The MV2-specific userScripts example is currently associated with the
"userScripts.register" API. While this is the correct API name, the
MDN documentation is actually at `userScripts_legacy/register`.

To make sure that the example is rendered in the right location,
change "userScripts" to "userScripts_legacy".

... and for completeness also add `runtime.onMessage` to the MV3
example, since that example uses this API.
This commit is contained in:
Rob Wu
2025-03-09 20:05:51 +01:00
committed by GitHub
parent d1116e32e9
commit 8f42801287

View File

@@ -569,7 +569,7 @@
{
"description": "Illustrates how an extension can register URL-matching user scripts at runtime (Manifest Version 2 only).",
"javascript_apis": [
"userScripts.register",
"userScripts_legacy.register",
"runtime.onMessage",
"runtime.sendMessage"
],
@@ -588,6 +588,7 @@
"permissions.onRemoved",
"permissions.request",
"runtime.onInstalled",
"runtime.onMessage",
"runtime.onUserScriptMessage",
"runtime.openOptionsPage",
"runtime.sendMessage",