Ai generated events#26
Conversation
alexpausan
left a comment
There was a problem hiding this comment.
A few small things, other than that seem good to go
| PLASMO_PUBLIC_LIVEKIT_API_KEY= | ||
| PLASMO_PUBLIC_LIVEKIT_SECRET= | ||
|
|
||
| PLASMO_PUBLIC_API_URL= No newline at end of file |
There was a problem hiding this comment.
This is still used, so I guess it should be there, right?
There was a problem hiding this comment.
yes. it is used by sendMessageToBg on flow save
| } | ||
|
|
||
| let listenersAdded = false | ||
| if (!listenersAdded) { |
There was a problem hiding this comment.
This is a global listener, being called when the extension loads. Do we need to do that? Or will it work only when recording is in progress or something similar?
For simple scripts, a global listener could do it, this being in the react context I would add it in the component lifecycle somewhere, to don't have a global db listener (if I can call it this way).
| timeoutMs: 1000, | ||
| function getElementSelector(el) { | ||
| let selector = el.tagName.toLowerCase() | ||
| const whitelist = ['name', 'data-*', 'role', 'title', 'alt', 'href', 'type'] |
There was a problem hiding this comment.
src could be here or we can skip it for now?
| const whitelist = ['name', 'data-*', 'role', 'title', 'alt', 'href', 'type'] | ||
| let hasValidAttr = false | ||
|
|
||
| whitelist.forEach((attr) => { |
There was a problem hiding this comment.
I would not use "whitelist/blacklist" as it can have negative connotations, and use Allowlist/Denylist (select/exclude list) ... etc :D
No description provided.