Started to refactor the scraper to handle multiple pages

This commit is contained in:
2025-07-13 17:29:56 -04:00
parent 53df3702ea
commit 4a41a38cbc

View File

@ -1,4 +1,4 @@
const ArtifactScraper = { const ChatArtifactScraper = {
getArtifactMenuButton() { getArtifactMenuButton() {
const artifactMenuButton = document.querySelector('button[aria-haspopup="menu"] svg[viewBox="0 0 256 256"] path[d*="M80,64a8,8,0,0,1,8-8H216"]'); const artifactMenuButton = document.querySelector('button[aria-haspopup="menu"] svg[viewBox="0 0 256 256"] path[d*="M80,64a8,8,0,0,1,8-8H216"]');
@ -232,4 +232,16 @@ const ArtifactScraper = {
return { artifacts: artifactCollection, fileMap: fileMap }; return { artifacts: artifactCollection, fileMap: fileMap };
} }
}; };
const ArtifactScraper = {
async collectArtifacts() {
// For now, delegate to ChatArtifactScraper
// In the future, this will check if we're on project homepage or chat
// and call the appropriate scraper
return await ChatArtifactScraper.collectArtifacts();
}
};
// No exports needed - will be in same scope after build // No exports needed - will be in same scope after build