Skip to content

Commit

Permalink
Replace FLOC with browsingTopics (#17)
Browse files Browse the repository at this point in the history
* Replace FLOC with browsingTopics
* Add FLEDGE
  • Loading branch information
SlayterDev authored Apr 14, 2022
1 parent b0604d6 commit 1ab692c
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 35 deletions.
31 changes: 23 additions & 8 deletions build/apple/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@
case './features/fingerprinting-hardware.js': return Promise.resolve().then(function () { return fingerprintingHardware; });
case './features/fingerprinting-screen-size.js': return Promise.resolve().then(function () { return fingerprintingScreenSize; });
case './features/fingerprinting-temporary-storage.js': return Promise.resolve().then(function () { return fingerprintingTemporaryStorage; });
case './features/floc.js': return Promise.resolve().then(function () { return floc; });
case './features/google-rejected.js': return Promise.resolve().then(function () { return googleRejected; });
case './features/gpc.js': return Promise.resolve().then(function () { return gpc; });
case './features/navigator-credentials.js': return Promise.resolve().then(function () { return navigatorCredentials; });
case './features/navigator-interface.js': return Promise.resolve().then(function () { return navigatorInterface; });
Expand Down Expand Up @@ -951,7 +951,7 @@
'fingerprintingCanvas',
'trackingCookies3p',
'trackingCookies1p',
'floc',
'googleRejected',
'gpc',
'fingerprintingHardware',
'referrer',
Expand Down Expand Up @@ -2532,16 +2532,31 @@
});

function init$6 () {
if ('interestCohort' in Document.prototype) {
try {
delete Document.prototype.interestCohort;
} catch {
// Throw away this exception, it's likely a confict with another extension
try {
if ('browsingTopics' in Document.prototype) {
delete Document.prototype.browsingTopics;
}
if ('joinAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.joinAdInterestGroup;
}
if ('leaveAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.leaveAdInterestGroup;
}
if ('updateAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.updateAdInterestGroup;
}
if ('runAdAuction' in Navigator.prototype) {
delete Navigator.prototype.runAdAuction;
}
if ('adAuctionComponents' in Navigator.prototype) {
delete Navigator.prototype.adAuctionComponents;
}
} catch {
// Throw away this exception, it's likely a confict with another extension
}
}

var floc = /*#__PURE__*/Object.freeze({
var googleRejected = /*#__PURE__*/Object.freeze({
__proto__: null,
init: init$6
});
Expand Down
2 changes: 1 addition & 1 deletion build/chrome/inject.js

Large diffs are not rendered by default.

31 changes: 23 additions & 8 deletions build/firefox/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@
case './features/fingerprinting-hardware.js': return Promise.resolve().then(function () { return fingerprintingHardware; });
case './features/fingerprinting-screen-size.js': return Promise.resolve().then(function () { return fingerprintingScreenSize; });
case './features/fingerprinting-temporary-storage.js': return Promise.resolve().then(function () { return fingerprintingTemporaryStorage; });
case './features/floc.js': return Promise.resolve().then(function () { return floc; });
case './features/google-rejected.js': return Promise.resolve().then(function () { return googleRejected; });
case './features/gpc.js': return Promise.resolve().then(function () { return gpc; });
case './features/navigator-credentials.js': return Promise.resolve().then(function () { return navigatorCredentials; });
case './features/navigator-interface.js': return Promise.resolve().then(function () { return navigatorInterface; });
Expand Down Expand Up @@ -918,7 +918,7 @@
'fingerprintingCanvas',
'trackingCookies3p',
'trackingCookies1p',
'floc',
'googleRejected',
'gpc',
'fingerprintingHardware',
'referrer',
Expand Down Expand Up @@ -2499,16 +2499,31 @@
});

function init$6 () {
if ('interestCohort' in Document.prototype) {
try {
delete Document.prototype.interestCohort;
} catch {
// Throw away this exception, it's likely a confict with another extension
try {
if ('browsingTopics' in Document.prototype) {
delete Document.prototype.browsingTopics;
}
if ('joinAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.joinAdInterestGroup;
}
if ('leaveAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.leaveAdInterestGroup;
}
if ('updateAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.updateAdInterestGroup;
}
if ('runAdAuction' in Navigator.prototype) {
delete Navigator.prototype.runAdAuction;
}
if ('adAuctionComponents' in Navigator.prototype) {
delete Navigator.prototype.adAuctionComponents;
}
} catch {
// Throw away this exception, it's likely a confict with another extension
}
}

var floc = /*#__PURE__*/Object.freeze({
var googleRejected = /*#__PURE__*/Object.freeze({
__proto__: null,
init: init$6
});
Expand Down
31 changes: 23 additions & 8 deletions build/integration/contentScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@
case './features/fingerprinting-hardware.js': return Promise.resolve().then(function () { return fingerprintingHardware; });
case './features/fingerprinting-screen-size.js': return Promise.resolve().then(function () { return fingerprintingScreenSize; });
case './features/fingerprinting-temporary-storage.js': return Promise.resolve().then(function () { return fingerprintingTemporaryStorage; });
case './features/floc.js': return Promise.resolve().then(function () { return floc; });
case './features/google-rejected.js': return Promise.resolve().then(function () { return googleRejected; });
case './features/gpc.js': return Promise.resolve().then(function () { return gpc; });
case './features/navigator-credentials.js': return Promise.resolve().then(function () { return navigatorCredentials; });
case './features/navigator-interface.js': return Promise.resolve().then(function () { return navigatorInterface; });
Expand Down Expand Up @@ -902,7 +902,7 @@
'fingerprintingCanvas',
'trackingCookies3p',
'trackingCookies1p',
'floc',
'googleRejected',
'gpc',
'fingerprintingHardware',
'referrer',
Expand Down Expand Up @@ -2483,16 +2483,31 @@
});

function init$6 () {
if ('interestCohort' in Document.prototype) {
try {
delete Document.prototype.interestCohort;
} catch {
// Throw away this exception, it's likely a confict with another extension
try {
if ('browsingTopics' in Document.prototype) {
delete Document.prototype.browsingTopics;
}
if ('joinAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.joinAdInterestGroup;
}
if ('leaveAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.leaveAdInterestGroup;
}
if ('updateAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.updateAdInterestGroup;
}
if ('runAdAuction' in Navigator.prototype) {
delete Navigator.prototype.runAdAuction;
}
if ('adAuctionComponents' in Navigator.prototype) {
delete Navigator.prototype.adAuctionComponents;
}
} catch {
// Throw away this exception, it's likely a confict with another extension
}
}

var floc = /*#__PURE__*/Object.freeze({
var googleRejected = /*#__PURE__*/Object.freeze({
__proto__: null,
init: init$6
});
Expand Down
2 changes: 1 addition & 1 deletion src/content-scope-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function load () {
'fingerprintingCanvas',
'trackingCookies3p',
'trackingCookies1p',
'floc',
'googleRejected',
'gpc',
'fingerprintingHardware',
'referrer',
Expand Down
9 changes: 0 additions & 9 deletions src/features/floc.js

This file was deleted.

24 changes: 24 additions & 0 deletions src/features/google-rejected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export function init () {
try {
if ('browsingTopics' in Document.prototype) {
delete Document.prototype.browsingTopics
}
if ('joinAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.joinAdInterestGroup
}
if ('leaveAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.leaveAdInterestGroup
}
if ('updateAdInterestGroup' in Navigator.prototype) {
delete Navigator.prototype.updateAdInterestGroup
}
if ('runAdAuction' in Navigator.prototype) {
delete Navigator.prototype.runAdAuction
}
if ('adAuctionComponents' in Navigator.prototype) {
delete Navigator.prototype.adAuctionComponents
}
} catch {
// Throw away this exception, it's likely a confict with another extension
}
}

0 comments on commit 1ab692c

Please sign in to comment.