Fixed some context
This commit is contained in:
11
src/main.js
11
src/main.js
@ -1,8 +1,17 @@
|
||||
async function main() {
|
||||
console.log('Running artifact collector');
|
||||
|
||||
const currentUrl = window.location.href;
|
||||
const isProjectPage = currentUrl.includes('/project/');
|
||||
const isChatPage = currentUrl.includes('/chat/');
|
||||
|
||||
if (!isProjectPage && !isChatPage) {
|
||||
console.log('Not on a project or chat page, exiting');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ProjectMeta.isInProject()) {
|
||||
console.log('Not in a project chat, exiting');
|
||||
console.log('Not in a project context, exiting');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user