Discussion:
[chromium-discuss] Prevent injecting extension content scripts for particular domains
Artyom Pranovich
2018-08-24 15:21:35 UTC
Permalink
Hi guys,

I'd like to know if there are any places in Chromium codebase where we can
restrict some domains from running/injecting content script on them?

Just for example, imagine I'd like to block running content scripts
injected by 'Extension X' / or by all extensions on any pages of my site
hosted on **.mydomain.com*. Of course assuming that I have custom chromium
build.
I'm pretty sure that there is such place, because *chrome://* pages already
do that (more info about blocking injecting content scripts on chrome://
pages is here
<https://groups.google.com/forum/#!topic/chromium-extensions/FORua7gwsqI>).

So if someone could guide me through the flow how I can do that, or just
give me directions to particular Chromium codebase place where I could look
into - it would be awesome!

Thanks,
Artyom.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
PhistucK
2018-08-26 09:22:38 UTC
Permalink
chrome:// is not examplatory here, because it uses a different scheme
(chrome://) as well as rendered by a different (more privileged) type of
processes.
However, the webstore (chrome.google.com/webstore) is excluded from content
scripts, so you can use cs.chromium.org to find the code that regards that
URL until you get to the specific method that causes content scripts not to
apply and add your cases there.

☆*PhistucK*


On Sun, Aug 26, 2018 at 12:19 PM Artyom Pranovich <
Post by Artyom Pranovich
Hi guys,
I'd like to know if there are any places in Chromium codebase where we can
restrict some domains from running/injecting content script on them?
Just for example, imagine I'd like to block running content scripts
injected by 'Extension X' / or by all extensions on any pages of my site
hosted on **.mydomain.com <http://mydomain.com>*. Of course assuming that
I have custom chromium build.
I'm pretty sure that there is such place, because *chrome://* pages
already do that (more info about blocking injecting content scripts on
chrome:// pages is here
<https://groups.google.com/forum/#!topic/chromium-extensions/FORua7gwsqI>
).
So if someone could guide me through the flow how I can do that, or just
give me directions to particular Chromium codebase place where I could
look into - it would be awesome!
Thanks,
Artyom.
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups
"Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...