Skip to content

Commit

Permalink
fix(build): add missing content script to web accessible resources (#…
Browse files Browse the repository at this point in the history
…2058)

* add missing content script to web-accessible resources
* Remove SERP notification from Safari build
  • Loading branch information
smalluban authored Nov 14, 2024
1 parent b900a47 commit a37d83a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 5 additions & 3 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,13 @@ manifest.web_accessible_resources?.forEach((entry) => {
paths.forEach((path) => {
if (path.includes('/redirects/')) return;

if (!path.match(/\.html$/)) {
if (path.match(/\.(html)$/)) {
source.push(path);
} else if (path.match(/\.(js)$/)) {
content_scripts.push(path);
} else {
throw new Error(`Unsupported web_accessible_resource: ${path}`);
}

source.push(path);
});
});

Expand Down
6 changes: 1 addition & 5 deletions src/manifest.safari.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@
"matches": ["*://www.youtube.com/*"],
"run_at": "document_start"
},
{
"js": ["content_scripts/whotracksme/ghostery-whotracksme.js"],
"run_at": "background_execute_script"
},
{
"js": ["content_scripts/trackers-preview.js"],
"run_at": "background_execute_script"
Expand All @@ -111,7 +107,7 @@
{
"resources": [
"pages/trackers-preview/index.html",
"pages/notifications/opera-serp.html"
"content_scripts/whotracksme/ghostery-whotracksme.js"
],
"matches": ["<all_urls>"],
"all_frames": true,
Expand Down
8 changes: 4 additions & 4 deletions xcode/Ghostery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 47;
CURRENT_PROJECT_VERSION = 48;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -955,7 +955,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 47;
CURRENT_PROJECT_VERSION = 48;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
Expand Down Expand Up @@ -1199,7 +1199,7 @@
CODE_SIGN_IDENTITY = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 47;
CURRENT_PROJECT_VERSION = 48;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = T3NRR7XMGG;
ENABLE_HARDENED_RUNTIME = NO;
Expand Down Expand Up @@ -1238,7 +1238,7 @@
CODE_SIGN_ENTITLEMENTS = "macOS (App)/Ghostery – Privacy Ad Blocker.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 47;
CURRENT_PROJECT_VERSION = 48;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = T3NRR7XMGG;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down

0 comments on commit a37d83a

Please sign in to comment.