Update Ad Blocking Scripts in a compliant way

243 views
Skip to first unread message

Marc kingdev

unread,
Oct 29, 2024, 8:53:04 AM10/29/24
to Chromium Extensions
Hello,

My question :
- For an Ad blocking extension, how do you keep your scripts updated without having to go through CWS review time and using remote scripts ?

Some background :
I started doing an Ad blocking extension because the ones i was using were getting constantly detected by Anti ad block scripts. So i wanted to create one that was focusing on the sites i was visiting and avoid being detected.

Last year when Youtube started their Anti Ad block campaign i lost a lot of users because i was not able to update the scripts in time, the review time was often a week+ and YT made update too fast to keep up.

I did not want to use remote scripts because i knew this would be flagged, so i used a middle ground where i would store the scripts in the local storage and then update them if needed with a 24h check, thus keeping all scripts local but be more responsive than CWS review time.

After about a year of everything going fine, i got a warning about using remote code. I explained the situation, but got robotic responses so far.

What are your best practice ? Facebook, Youtube and the popup networks are the ones i need to update very quickly to avoid breaking the sites.

I am only talking here about site that require specific scripts, i actually love the JSON updates for the declarativeNetRequest, it works great and i wish i had a similar option for the scripts.

Marc kingdev

unread,
Nov 4, 2024, 11:26:36 AM11/4/24
to Chromium Extensions, Marc kingdev
I am bumping the subject. I made multiple submissions to find a solution to this problem but it always gets rejected after 5 to 7 days reviews
Are we in a taboo situation where the CWS kills ad blockers by making review time impossible to catch up on code change timing requirements ?

I do not understand why Firefox and Edge can accept my code and not the CWS, is there anything being worked on at least ?

If i change my code to have the user APPROVE any new script update, or having the user click on an "update scripts" button, would it be acceptable ?
Another acceptable solution for me would be to have expedited review time, similar to JSON rules updates.

Has anyone found a solution to this current dead end ?

Oliver Dunk

unread,
Nov 4, 2024, 11:39:51 AM11/4/24
to Marc kingdev, Chromium Extensions
Hi Marc,

If you need to update these scripts frequently, my suggestion would be to use the `userScripts` API, which is explicitly exempted from the remote hosted code policy: https://developer.chrome.com/docs/webstore/program-policies/mv3-requirements/

I can't speak to how other extensions approach this - but I will say I haven't seen any other developers take that approach. That makes me wonder if there is perhaps a way to build the script that would require less frequent updates.

Adding the ability to approve script updates or manually check for updates wouldn't be sufficient here. Other than the exceptions mentioned in the policy I linked above, any usage of remotely hosted code is forbidden. You can learn more about that here: https://www.youtube.com/watch?v=aYxzHUX_elo

I can't speak to the policies of other stores but I will say that being able to run code which wasn't reviewed is something which we've seen abused in the past. Our policies are based around keeping users safe and unfortunately that does mean we can't support everything. We aren't trying to target any specific type of extension and added capabilities in Manifest V3 like the `userScripts` API specifically to ensure types of extensions that needed those capabilities could continue to exist.
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/d081291f-4041-4c88-b346-ba7db679597cn%40chromium.org.
Reply all
Reply to author
Forward
0 new messages