Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

Auto-fix formatting issues

GitHub Actionf35ed9e5d51e
diff --git a/src-tauri/src/inject/event.js b/src-tauri/src/inject/event.js
index 3d030f69..8dc757b4 100644
--- a/src-tauri/src/inject/event.js
+++ b/src-tauri/src/inject/event.js
@@ -451,11 +451,7 @@ const PREVIEWABLE_MEDIA_EXTENSIONS = [
// routes (e.g. MEXC /assets/future) and would be intercepted as downloads.
// Extensionless links under these paths still match; prefer real extensions,
// download attributes, or ?download / ?attachment query hints when possible.
-const DOWNLOAD_PATH_PATTERNS = [
- "/download/",
- "/files/",
- "/attachments/",
-];
+const DOWNLOAD_PATH_PATTERNS = ["/download/", "/files/", "/attachments/"];
// Language detection utilities
function getUserLanguage() {
diff --git a/tests/unit/download-http-status.test.ts b/tests/unit/download-http-status.test.ts
index ea49673a..22ef916f 100644
--- a/tests/unit/download-http-status.test.ts
+++ b/tests/unit/download-http-status.test.ts
@@ -37,4 +37,3 @@ describe('download HTTP status handling', () => {
expect(patternsBlock).toContain('/attachments/');
});
});
-
diff --git a/tests/unit/event-link-guard.test.js b/tests/unit/event-link-guard.test.js
index f615e6cd..ebf0cd0e 100644
--- a/tests/unit/event-link-guard.test.js
+++ b/tests/unit/event-link-guard.test.js
@@ -244,9 +244,9 @@ describe("event link guard", () => {
"download_file",
expect.anything(),
]);
- expect(context.isDownloadableFile("https://www.mexc.com/assets/future")).toBe(
- false,
- );
+ expect(
+ context.isDownloadableFile("https://www.mexc.com/assets/future"),
+ ).toBe(false);
});
it("still downloads real files that live under /assets/ by extension", () => {
@@ -263,9 +263,9 @@ describe("event link guard", () => {
it("keeps intentional download-path interception for extensionless /download/ links", () => {
const { isDownloadableFile } = loadEventHelpers();
- expect(
- isDownloadableFile("https://example.com/download/export"),
- ).toBe(true);
+ expect(isDownloadableFile("https://example.com/download/export")).toBe(
+ true,
+ );
expect(isDownloadableFile("https://example.com/files/report.pdf")).toBe(
true,
);