Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(adblocker): inject scriptlets from source code #2119

Merged
merged 6 commits into from
Dec 10, 2024
Merged

Conversation

chrmod
Copy link
Member

@chrmod chrmod commented Dec 5, 2024

instagram.com and facebook.com introduced strict CSP that prevent current scriplet injection method that we use currently. To bypass those restrictions we have to pass scritpelts as code with help of chrome.scripting.executeScript.

This however require us to ship the scriptlets and evaluate them in the background context.

A new repository to provide scriptlet code is created https://github.com/ghostery/scriptlets. As its code comes from other project like uBO, there is no need for any kind of versioning scheme so we will use git commit checksums instead and install from github directly.

As this means we have to ship GPL code with the extension, we are forced to switch license from MPL-v2 to GPL-v3.

Please test on facebook.com, instagram.com and youtube.com.

package.json Outdated Show resolved Hide resolved
@chrmod chrmod requested a review from smalluban December 9, 2024 13:31
@chrmod chrmod force-pushed the ubo-scriptlets branch 2 times, most recently from d4dd62a to e0cab72 Compare December 9, 2024 13:46
@smalluban smalluban added the package CI: create extension packages label Dec 9, 2024
@chrmod chrmod changed the title POC: use uBO scriptlets from source Scriptets as code Dec 9, 2024
@chrmod chrmod added Bug Something isn't working Feature Request labels Dec 9, 2024
@chrmod chrmod marked this pull request as ready for review December 9, 2024 17:43
@smalluban smalluban changed the title Scriptets as code fix(adblocker): inject scriptlets from source code Dec 10, 2024
Copy link

@ghostery ghostery deleted a comment from github-actions bot Dec 10, 2024
@ghostery ghostery deleted a comment from github-actions bot Dec 10, 2024
@ghostery ghostery deleted a comment from github-actions bot Dec 10, 2024
@ghostery ghostery deleted a comment from github-actions bot Dec 10, 2024
@ghostery ghostery deleted a comment from github-actions bot Dec 10, 2024
@ghostery ghostery deleted a comment from github-actions bot Dec 10, 2024
@ghostery ghostery deleted a comment from github-actions bot Dec 10, 2024
Copy link

@chrmod chrmod merged commit 964866c into main Dec 10, 2024
2 checks passed
@chrmod chrmod deleted the ubo-scriptlets branch December 10, 2024 16:00
@smalluban smalluban mentioned this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feature Request package CI: create extension packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants