Skip to content

Commit

Permalink
fix: cannot execute multiple bookmarklets
Browse files Browse the repository at this point in the history
  • Loading branch information
foray1010 committed Mar 9, 2023
1 parent 97f3a75 commit 59ec1a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
},
{
"path": "build/production/js/popup.js",
"limit": "13.92 kB"
"limit": "13.93 kB"
}
]
4 changes: 3 additions & 1 deletion src/popup/modules/bookmarks/methods/openBookmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export async function openBookmarksInBrowser(

const bookmarkletUrls = allUrls.filter(isJSProtocol)
if (openBookmarkProps.isAllowBookmarklet) {
if (bookmarkletUrls[0]) await execInPage(bookmarkletUrls[0])
for (const bookmarkletUrl of bookmarkletUrls) {
await execInPage(bookmarkletUrl)
}
}

const urls = allUrls.filter((x) => !isJSProtocol(x))
Expand Down

0 comments on commit 59ec1a1

Please sign in to comment.