Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sammacbeth committed Nov 3, 2023
1 parent a61b127 commit 94c77d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions privacy-protections/surrogates/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function checkSurrogate () {
}

const surrogates = {
'head': {
head: {
notes: 'Loading surrogate in <head>',
load: () => Promise.resolve(checkSurrogate()), // included in the html
cleanUp: () => {
Expand Down Expand Up @@ -119,7 +119,7 @@ const surrogates = {
}
};

async function injectSurrogate(testData) {
async function injectSurrogate (testData) {
return new Promise((resolve, reject) => {
const s = document.createElement('script');

Expand All @@ -143,13 +143,13 @@ async function injectSurrogate(testData) {
s.src = testData.url;

document.body.appendChild(s);
})
});
}

(async function loadSurrogates () {
for (const [name, testData] of Object.entries(surrogates)) {
if (testData.url) {
await injectSurrogate(testData)
await injectSurrogate(testData);
} else {
testData.load().then(result => {
testData.test = () => result;
Expand Down

0 comments on commit 94c77d1

Please sign in to comment.