-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ESLint standard config * Adding semicolons to match SERP
- Loading branch information
1 parent
3c067e9
commit 4c99735
Showing
27 changed files
with
2,155 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
privacy-protections/fingerprinting/helpers/diff.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "standard", | ||
"rules": { | ||
"indent": ["error", 4], | ||
"semi": ["error", "always"] | ||
}, | ||
"env": { | ||
"browser": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"globals": { | ||
"data": "writable" | ||
}, | ||
"parserOptions": { | ||
"sourceType": "script", | ||
"ecmaFeatures": { | ||
"globalReturn": false | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
/* globals log */ | ||
|
||
(() => { | ||
let base = new URL(document.currentScript.src); | ||
let party = base.origin == window.top.location.origin ? 'first' : 'third'; | ||
let scriptName = `${party} party script`; | ||
const base = new URL(document.currentScript.src); | ||
const party = base.origin === window.top.location.origin ? 'first' : 'third'; | ||
const scriptName = `${party} party script`; | ||
|
||
log(scriptName, new Error().stack); | ||
log(scriptName, new Error().stack); | ||
|
||
let worker = new Worker('./worker.js'); | ||
worker.addEventListener('message', msg => { | ||
let { source, stackValue } = msg.data; | ||
log(`${scriptName} loading ${source}`, stackValue); | ||
}); | ||
worker.postMessage({ action: 'setup' }); | ||
const worker = new Worker('./worker.js'); | ||
worker.addEventListener('message', msg => { | ||
const { source, stackValue } = msg.data; | ||
log(`${scriptName} loading ${source}`, stackValue); | ||
}); | ||
worker.postMessage({ action: 'setup' }); | ||
|
||
setTimeout(() => { | ||
log(`${scriptName} setTimeout`, new Error().stack); | ||
}, 0) | ||
setTimeout(() => { | ||
log(`${scriptName} setTimeout`, new Error().stack); | ||
}, 0); | ||
|
||
document.write(`<script>log('${scriptName} write', new Error().stack);</script>`); | ||
document.write(`<script>log('${scriptName} write', new Error().stack);</script>`); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
function log(source, stackValue) { | ||
postMessage({ source, stackValue }); | ||
function log (source, stackValue) { | ||
postMessage({ source, stackValue }); | ||
} | ||
|
||
self.addEventListener('message', msg => { | ||
if (msg.data.action && msg.data.action === 'setup') { | ||
setup(); | ||
} | ||
if (msg.data.action && msg.data.action === 'setup') { | ||
setup(); | ||
} | ||
}); | ||
|
||
function setup() { | ||
log("worker", new Error().stack) | ||
function setup () { | ||
log('worker', new Error().stack); | ||
|
||
setTimeout(() => { | ||
log("worker setTimeout", new Error().stack) | ||
}, 0); | ||
setTimeout(() => { | ||
log('worker setTimeout', new Error().stack); | ||
}, 0); | ||
} |
Oops, something went wrong.