diff --git a/api-samples/userScripts/options.js b/api-samples/userScripts/options.js index ebf8faaf0c..5fa3a2a6ef 100644 --- a/api-samples/userScripts/options.js +++ b/api-samples/userScripts/options.js @@ -67,7 +67,9 @@ async function onSave() { script }); - const existingScripts = await chrome.userScripts.getScripts(); + const existingScripts = await chrome.userScripts.getScripts({ + ids: [USER_SCRIPT_ID] + }); if (existingScripts.length > 0) { // Update existing script.