Skip to content

Commit

Permalink
Fix: Using content-script download as background-script download is b…
Browse files Browse the repository at this point in the history
…uggy for some users ; revoking downloads permission (#249)

* fix: using content-script download as background-script download is buggy

* 3.7.5
  • Loading branch information
Hugo-COLLIN authored Feb 1, 2025
1 parent 7b7258c commit c2e1090
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "save-my-chatbot",
"version": "3.7.4",
"version": "3.7.5",
"license": "RMD-C 1.1",
"author": "Hugo COLLIN",
"homepage": "https://save.hugocollin.com",
Expand Down
6 changes: 6 additions & 0 deletions public/files/updateNotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Update notes
# 3.7.5
🐞 Sorry for the mess
These days, the download was buggy and required extra download permissions.
I really apologize and I hope it didn't bother you too much.
It's now fixed and you can download your files as usual!

# 3.7.4
⬇️ Download Save As dialog fixed
Some users reported that the "Save As" dialog was not showing up anymore. It is now solved!
Expand Down
2 changes: 1 addition & 1 deletion src/features/scraper/output/defineOutputMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {download, sendToWebhook} from "../../../core/services/outputMethods/outp
export async function defineOutputMethod(domain: { name: string; url: any; }, {markdownContent, fileName}: { title: string; fileName: any; markdownContent: string; }): Promise<void> {

// Download the file locally
await download(markdownContent, fileName);
// await download(markdownContent, fileName);

// Send the file to the webhook
await sendToWebhook(markdownContent, fileName);
Expand Down
4 changes: 4 additions & 0 deletions src/features/scraper/scrapPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {safeExecute} from "../../core/utils/jsShorteners";
import {handleModalDisplay} from "../../core/components/modals/cs/actions/displayCtaModals";
import {getStorageData} from "../../core/utils/chromeStorage";
import ModalMessage from "../../core/components/modals/cs/types/ModalMessage";
import {contentScriptDownload} from "../../core/services/outputMethods/outputMethods";

export async function scrapPage() {
const domainPage = await getStorageData("domainPage", "local") as { name: string; url: any; };
Expand Down Expand Up @@ -33,6 +34,9 @@ export async function launchScrapping(domain: { name: string; url: any; }): Prom
}
});

//TODO temporary download from content-script
contentScriptDownload(extracted.markdownContent, extracted.fileName);

console.log("Export done!")
}

Expand Down
3 changes: 1 addition & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"scripting",
"activeTab",
"storage",
"contextMenus",
"downloads"
"contextMenus"
],
"host_permissions": [
"*://*.phind.com/*",
Expand Down

0 comments on commit c2e1090

Please sign in to comment.