balena-io-experimental / meetbot

A Google Meet bot to make meetings frictionless
GNU Affero General Public License v3.0
32 stars 13 forks source link

Extract all hardcoded selectors to a single file and give a meaningful name #57

Open tmigone opened 2 years ago

tmigone commented 2 years ago

Example: https://github.com/balena-io-playground/meetbot/blob/0a824f03066bb0d34b3d9cbb4501857436038604/src/meetbot/features/record.ts#L15

Would make it easier to maintain since you won't need to go looking for the strings (given that Google Meet UI changes often) and also a better notion of how "hacky" things are.

20k-ultra commented 2 years ago

I think even better is to make these environment variables so that you don't need to rebuild your application or push code to update the bot. Ideally, the selectors are not HTML elements but rather a more robust mechanism that simply looks for an HTML element with the words "Record" when you hover over it...that's obviously much harder.