-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmedium-content-script.js
More file actions
24 lines (23 loc) · 1.3 KB
/
Copy pathmedium-content-script.js
File metadata and controls
24 lines (23 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const medium = new MediumSource();
const claude = new ClaudePlatform();
const chatgpt = new ChatGPTPlatform();
chrome.storage.sync.get({ mediumEnabled: true }, (result) => {
if (!result.mediumEnabled || !medium.isMatch()) return;
medium.injectUI({
openInClaude: async () => {
const text = await medium.getFormattedContent();
const message = `Here's a Medium article I'd like to discuss. Please start with a brief summary of the key points, then I'll have some questions and thoughts to explore with you.\n\n${text}`;
claude.openWithContext(message);
},
openInChatGPT: async () => {
const text = await medium.getFormattedContent();
const message = `Here's a Medium article I'd like to discuss. Please start with a brief summary of the key points, then I'll have some questions and thoughts to explore with you.\n\n${text}`;
chatgpt.openWithContext(message);
},
copyForAI: async () => {
const text = await medium.getFormattedContent();
const message = `Here's a Medium article I'd like to discuss. Please start with a brief summary of the key points, then I'll have some questions and thoughts to explore with you.\n\n${text}`;
await Clipboard.copy(message);
}
});
});