Started to refactor the scraper to handle multiple pages
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const ArtifactScraper = {
|
||||
const ChatArtifactScraper = {
|
||||
|
||||
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"]');
|
||||
@ -232,4 +232,16 @@ const ArtifactScraper = {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user