Skip to content

Commit f46e98c

Browse files
authored
Workaround inconsistent entity name for Facebook (#255)
The extension configuration and block list have inconsistent entity names for Facebook. The extension configuration uses "Facebook", whereas the block list uses "Facebook, Inc.". We'll fix that in the extension configuration soon, but in the mean time let's ensure we don't display the Click to Load placeholders for first-party Facebook content!
1 parent 7357fe1 commit f46e98c

File tree

8 files changed

+43
-8
lines changed

8 files changed

+43
-8
lines changed

Sources/ContentScopeScripts/dist/contentScope.js

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/android/contentScope.js

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/chrome-mv3/inject.js

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/chrome/inject.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/firefox/inject.js

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/integration/contentScope.js

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/windows/contentScope.js

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/features/click-to-play.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1354,11 +1354,16 @@ export function init (args) {
13541354
sharedStrings = localizedConfig.sharedStrings
13551355

13561356
for (const entity of Object.keys(config)) {
1357+
// TODO: Remove this workaround once the privacy-configuration has been
1358+
// updated, and 'Facebook, Inc.' is used consistently in
1359+
// content-scope-scripts too.
1360+
const normalizedEntity = entity === 'Facebook' ? 'Facebook, Inc.' : entity
1361+
13571362
// Strip config entities that are first-party, or aren't enabled in the
13581363
// extension's clickToPlay settings.
13591364
// Note: To support legacy configurations consider `undefined` state as
13601365
// "enabled".
1361-
if ((websiteOwner && entity === websiteOwner) ||
1366+
if ((websiteOwner && normalizedEntity === websiteOwner) ||
13621367
!settings[entity] ||
13631368
settings[entity].state === 'disabled') {
13641369
delete config[entity]

0 commit comments

Comments
 (0)