balta2ar / brotab

Control your browser's tabs from the command line
MIT License
389 stars 27 forks source link

Execute javascript on tab #77

Open DiamondDemon669 opened 2 years ago

DiamondDemon669 commented 2 years ago

I want to execute javascript on a selected tab.

I saw a runScript function in the code and chrome.tabs has an executeScript function

Valodim commented 2 years ago

I would also like to see this feature, it would really lift brotab's usefulness to the next level.

However, it's currently unclear how manifest v3 extensions could execute js code that isn't statically bundled with the extension itself. So until this is cleared up, such a feature requires breaking chrome web store policies. See this tampermonkey thread for more details: https://github.com/Tampermonkey/tampermonkey/issues/644

DiamondDemon669 commented 2 years ago

Good news! I have managed to code this feature myself. Pull request coming soon (maybe) because I need to iron out all the bugs

Valodim commented 2 years ago

Sweet! Don't worry about polish too much, nothing wrong with a draft to gauge interest