Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crawler detection page #22

Merged
merged 4 commits into from
Feb 8, 2021

Conversation

sammacbeth
Copy link
Collaborator

Basic test page to allow tracker-radar-collector to test if it can be detected as a crawler.

@sammacbeth sammacbeth requested a review from kdzwinel February 5, 2021 17:03
Copy link
Member

@kdzwinel kdzwinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very neat! Could you please add a link to this page from https://github.com/duckduckgo/privacy-test-pages/blob/gh-pages/index.html ? We probably need "Other" category because it doesn't seem to fit anywhere else.

BTW see https://github.com/duckduckgo/privacy-test-pages#how-to-create-a-new-test

<title>Headless detector</title>
</head>

<body>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add breadcrumbs and a description like we have on other pages?

header

Sth like "This page collects various tests for detecting headless browsers."

displayResult('plugins', navigator.plugins.length == 0, navigator.plugins.length);
displayResult('languages', navigator.languages == "", navigator.languages);
displayResult('webdriver', !!navigator.webdriver, navigator.webdriver)
displayResult('window.chrome', !window.chrome || !window.chrome.runtime, JSON.stringify(window.chrome))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI there is no window.chrome.runtime in Chrome Canary (90) and my plugins are in fact empty. Probably not a big deal, but shows that those tests are somehow not reliable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The articles around this also stress that some of these methods only work with certain versions. Having this also as a webpage means we can also test against normal chrome, and remove tests which no longer pass for real browsers.

listEntry.querySelector('.value').textContent = result ? 'fail' : 'pass';
ul.appendChild(listEntry)
if (result) {
fetch(`./fail.json?test=${test}&${detectValue}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this :) I'd add a note that this is used for easy access to test results from the crawler's output.

@sammacbeth
Copy link
Collaborator Author

Thanks @kdzwinel - sorry I missed the docs on making a new page. I've updated the page to match the template and address your other comments.

Copy link
Member

@kdzwinel kdzwinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries and thanks again for adding this page!

@kdzwinel kdzwinel merged commit 36c2b35 into duckduckgo:gh-pages Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants