Exafunction / codeium-chrome

Free, ultrafast code autocomplete for Chrome
https://www.codeium.com/
MIT License
110 stars 16 forks source link

Allow specific web pages to opt out of autocomplete #31

Closed hatemhosny closed 10 months ago

hatemhosny commented 10 months ago

Although the autocomplete feature is of great help, some websites might not want their users to use it in specific web pages.

Example: if a user uses autocomplete superpowers in websites like codewars, leetcode or LiveCodes code challenges (specially if the time factor is important), it might be considered as cheating :) However, if the same website uses the editor in code tutorials, it might be desirable to enable the autocomplete.

My suggestion:

If a web page includes this meta tag, the autocomplete should not be activated in this specific web page even if the domain is in the allowlist:

<meta name="codeium:type" content="none">

I expect if site owners have control over when to enable/disable the autocomplete, more websites are more likely to endorse it and tell the users about it (even as a feature).

If you agree to this approach, I can open a PR with the implementation, including the option to restrict injection type by the value of the content attribute as mentioned here: https://github.com/Exafunction/codeium-chrome/pull/29#pullrequestreview-1579608749

pqn commented 10 months ago

This seems reasonable. I think the additional use case is for our first party partners, we would want to disable the Chrome extension automatically, since they have their own integration.