Skip to content

Commit

Permalink
refactor: display how many original browser tabs there were
Browse files Browse the repository at this point in the history
  • Loading branch information
decaf-dev committed Dec 26, 2023
1 parent d28c961 commit aadf2bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/commands/export-into-multiple-notes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const callback = (app: App, settings: PluginSettings) => async () => {
const tabs = await exportBrowserTabs(
browserApplicationName
);
console.log(`Found ${tabs.length} browser tabs`);

let numExported = 0;
let numExportedTabs = 0;

for (const tab of tabs) {
const { title, url } = tab;
Expand Down Expand Up @@ -56,10 +57,10 @@ const callback = (app: App, settings: PluginSettings) => async () => {
filePath,
data
);
numExported++;
numExportedTabs++;
}
new Notice(
`Exported ${numExported} browser tabs from ${browserApplicationName}`
`Exported ${numExportedTabs} browser tabs from ${browserApplicationName}`
);
} catch (err) {
console.error(err);
Expand Down

0 comments on commit aadf2bb

Please sign in to comment.