Skip to content

Commit

Permalink
Filter getScripts call
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverdunk committed Oct 31, 2023
1 parent f236ea6 commit 087fddf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api-samples/userScripts/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 087fddf

Please sign in to comment.