${rec.title}
- ${rec.authors ? rec.authors.map(a => a.name).join(', ') : 'Unknown Authors'}
- (${rec.year || 'n.d.'})
+ ${rec.authors ? rec.authors.map((a) => a.name).join(", ") : "Unknown Authors"}
+ (${rec.year || "n.d."})
Score: ${Math.round(rec.score * 100)}%
- `).join('');
+ `,
+ )
+ .join("");
} else {
recList.innerHTML = 'No recommendations found.
';
}
-
} catch (e) {
showError("Failed to communicate with Zotero: " + e.message);
}
diff --git a/paper-recommender-extension/test_extension.js b/paper-recommender-extension/test_extension.js
index 1b7e7f05a..5b5844e5c 100644
--- a/paper-recommender-extension/test_extension.js
+++ b/paper-recommender-extension/test_extension.js
@@ -1,5 +1,5 @@
-const { extractOMRC } = require('./lib/omrc_extractor.js');
-const { fetchRecommendations } = require('./lib/recommender.js');
+const { extractOMRC } = require("./lib/omrc_extractor.js");
+const { fetchRecommendations } = require("./lib/recommender.js");
// Mock fetch for Node.js environment
global.fetch = async (url) => {
@@ -8,11 +8,23 @@ global.fetch = async (url) => {
ok: true,
json: async () => ({
data: [
- { title: "Paper A", abstract: "We propose a new method for paper recommendation using deep learning.", authors: [{ name: "Author 1" }], year: 2024, url: "http://example.com/a" },
- { title: "Paper B", abstract: "This study analyzes the impact of OMRC structure on citation counts.", authors: [{ name: "Author 2" }], year: 2023, url: "http://example.com/b" },
- { title: "Paper C", abstract: "Unrelated work on quantum physics.", authors: [{ name: "Author 3" }], year: 2022, url: "http://example.com/c" }
- ]
- })
+ {
+ title: "Paper A",
+ abstract: "We propose a new method for paper recommendation using deep learning.",
+ authors: [{ name: "Author 1" }],
+ year: 2024,
+ url: "http://example.com/a",
+ },
+ {
+ title: "Paper B",
+ abstract: "This study analyzes the impact of OMRC structure on citation counts.",
+ authors: [{ name: "Author 2" }],
+ year: 2023,
+ url: "http://example.com/b",
+ },
+ { title: "Paper C", abstract: "Unrelated work on quantum physics.", authors: [{ name: "Author 3" }], year: 2022, url: "http://example.com/c" },
+ ],
+ }),
};
};
diff --git a/patches/discord-protos.patch b/patches/discord-protos.patch
new file mode 100644
index 000000000..ee02038c8
--- /dev/null
+++ b/patches/discord-protos.patch
@@ -0,0 +1,85 @@
+diff --git a/dist/index.d.ts b/dist/index.d.ts
+new file mode 100644
+index 0000000000000000000000000000000000000000..ccc219671ec4c045c9f3f1d450ad48c73e980f58
+--- /dev/null
++++ b/dist/index.d.ts
+@@ -0,0 +1,37 @@
++import type { JsonValue } from "@protobuf-ts/runtime";
++
++interface ProtoMessage {
++ [key: string]: unknown;
++}
++
++interface SettingsVersions {
++ clientVersion: number;
++ serverVersion: number;
++ dataVersion: number;
++}
++
++interface IProtoMessageType