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

Selective removal of content scripts to preserve web extension scripts #1178

Merged
merged 7 commits into from
Jan 31, 2025

Conversation

tomasstrba
Copy link
Contributor

Please review the release process for BrowserServicesKit here.

Required:

Task/Issue URL: https://app.asana.com/0/1148564399326804/1208639570494573/f
Tech Design URLs:
https://app.asana.com/0/1148564399326804/1208723118351448
https://app.asana.com/0/481882893211075/1208870697435574/f
iOS PR:
macOS PR: duckduckgo/macos-browser#3742
What kind of version bump will this require?: Patch

Description:
Refactoring of content scripts removal in order to preserve web extension scripts in the tab. This change is related to enabling web extensions for internal users

Steps to test this PR:

  1. On both platforms, make sure user script functionality is unaffected. User scripts for content blocking, autofill or other features must be present and functional

OS Testing:

  • iOS 16
  • macOS 12

Internal references:

Software Engineering Expectations
Technical Design Template

@@ -216,10 +217,39 @@ final public class UserContentController: WKUserContentController {
super.removeAllContentRuleLists()
}

#if os(macOS)
private let removeUserScriptSelector = "removeUserScript:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static let

Copy link
Collaborator

@mallexxx mallexxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomasstrba tomasstrba merged commit 82d0d83 into main Jan 31, 2025
7 checks passed
@tomasstrba tomasstrba deleted the tom/webextensions branch January 31, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants