You want AI in your browser? Just add as a "search engine" option, with a URL like
https://chatgpt.com/?q=%25s
, with a shortcut like @ai. You can then ask it anything right there in your search bar.
Maybe also add one with a URL with some query pre-written like
https://chatgpt.com/?q=summarize this page for me: %s
as @ais or something, modern chatbots have the ability to make HTTP requests for you. Then if you want to summarize the page you're on, you do Ctrl+L Ctrl+C @ais Ctrl+V Enter. There, I solved all your AI needs with 4 shortcuts without literally any client-side code.