Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pages/subscribe/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,17 @@ async function main() {
siteUrl
});
alert(I18N.getMessage("subscribe_subscribed", folderTitle));

document.querySelector("#subscribe-button").disabled = true;
});

// Disable Subscribe Button if the Feed is already in the Folder
const parentId = await Settings.getDefaultFolder();
const bookmarks = (await browser.bookmarks.search({title: title})).filter(node => node.parentId === parentId);
Comment thread
hollow-owl marked this conversation as resolved.
Outdated
if (bookmarks.length > 0) {
document.querySelector("#subscribe-button").disabled = true;
}

setPreviewContent(`<main>${getPreviewHTML(feed)}</main>`);
} catch (e) {
console.log(e);
Expand Down