added ability to open folders as well. issue #323
This commit is contained in:
parent
18bc8eb5aa
commit
c4650d12bd
1 changed files with 10 additions and 5 deletions
|
@ -283,11 +283,16 @@ const assignManager = {
|
|||
},
|
||||
|
||||
async _onClickedBookmark(info) {
|
||||
const bookmark = await browser.bookmarks.get(info.bookmarkId);
|
||||
let bookmarks = await browser.bookmarks.get(info.bookmarkId);
|
||||
if (bookmarks[0].type === "folder") {
|
||||
bookmarks = await browser.bookmarks.getChildren(bookmarks[0].id);
|
||||
}
|
||||
for (let bookmark of bookmarks) { // eslint-disable-line prefer-const
|
||||
browser.tabs.create({
|
||||
cookieStoreId: info.menuItemId,
|
||||
url: bookmark[0].url
|
||||
url: bookmark.url
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue