Files
claude-artifact-scraper/background.js

15 lines
460 B
JavaScript

browser.browserAction.onClicked.addListener((tab) => {
console.log('Extension clicked - triggering artifact collection.');
// Check if we're on the correct domain and path
if (!tab.url.startsWith('https://claude.ai/chat') && !tab.url.startsWith('https://claude.ai/project')) {
console.log('Not on claude.ai chat page');
return;
}
// Inject the content script file
browser.tabs.executeScript(tab.id, {
file: 'content.js'
});
});