3 ms·
Chrome extensions let you execute JS on certain sites, so we can querySelect all target textareas and insert the toolbar anywhere. And yes! That includes dynami
by francesc_holly 1y ago
Chrome extensions let you execute JS on certain sites, so we can querySelect all target textareas and insert the toolbar anywhere. And yes! That includes dynamically loaded elements like the PR review window. We can even apply light/dark themes that match GitHub's ;)
If you want specifics you can check out the open-source repo here: https://github.com/pullpo-io/conventional-comments https://github.com/pullpo-io/conventional-comments
I suggest looking at `content.js`, constant `TARGET_TEXTAREA_SELECTORS` and function `initializeToolbarForTextarea`.