diff --git a/privacy-protections/fingerprinting/main.js b/privacy-protections/fingerprinting/main.js index a743cc7..33cda59 100644 --- a/privacy-protections/fingerprinting/main.js +++ b/privacy-protections/fingerprinting/main.js @@ -41,11 +41,22 @@ function runTests () { testsDetailsDiv.innerHTML = ''; + const pageURL = new URL(location.href); + let disabledTests = []; + + if (pageURL.searchParams.has('disable_tests')) { + disabledTests = pageURL.searchParams.get('disable_tests').split(','); + } + function updateSummary () { testsSummaryDiv.innerText = `Collected ${all} datapoints${failed > 0 ? ` (${failed} failed)` : ''}. Click for details.`; } tests.forEach(test => { + if (disabledTests.includes(test.id)) { + console.log(`Test "${test.id}" disabled via url param.`); + return; + } if (test.category === 'all-props' && !includeAllPropsCheckbox.checked) { return; }