-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* AMP link protection page * Link change * Add cloaked URLs * Clean up and add expected URLs * Update worng expected links * Add query params test page * Lint
- Loading branch information
1 parent
deeb0ef
commit 10df8d9
Showing
5 changed files
with
82 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Query Parameters</title> | ||
|
||
<style> | ||
.expected { | ||
color: grey; | ||
font-size: 14px; | ||
margin-top: -10px; | ||
margin-bottom: -4px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p><a href="../../">[Home]</a> ↣ <a href="../">[Privacy Protections Tests]</a> ↣ <strong>[Query Parameters]</strong></p> | ||
|
||
<p>This test page has sample links that use tracking query parameters. When clicking on the sample links the displayed results should be equal to the listed "Expected" value.</P> | ||
|
||
<div id="demo"> | ||
<p>URLs with Tracking Parameters</p> | ||
<ul> | ||
<li> | ||
<p><a href="/privacy-protections/query-parameters/query.html?utm_source=something&q=other">Link with utm_source and 1 standard parameter</a></p> | ||
<p class="expected">Expected: "q=other"</p> | ||
</li> | ||
<li> | ||
<p><a href="/privacy-protections/query-parameters/query.html?utm_source=something&utm_medium=somethingelse">Link with utm_source and utm_medium</a></p> | ||
<p class="expected">Expected: ""</p> | ||
</li> | ||
<li> | ||
<p><a href="/privacy-protections/query-parameters/query.html?fbclid=12345&fb_source=someting&u=14">Link with fbclid, fb_source and 1 standard parameter</a></p> | ||
<p class="expected">Expected: "u=14"</p> | ||
</li> | ||
<li> | ||
<p><a href="/privacy-protections/query-parameters/query.html?q=something&id=1234">Link which should not be rewritten</a></p> | ||
<p class="expected">Expected: "q=something&id=1234"</p> | ||
</li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
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,8 @@ | ||
(function () { | ||
window.addEventListener('load', function (event) { | ||
const queryParams = new URLSearchParams(window.location.search); | ||
// display the query parameters in the element with id results | ||
console.log(queryParams); | ||
document.getElementById('results').innerHTML = queryParams.toString(); | ||
}); | ||
})(); |
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,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Query Parameters Landing</title> | ||
|
||
<style> | ||
.expected { | ||
color: grey; | ||
font-size: 14px; | ||
margin-top: -10px; | ||
margin-bottom: -4px; | ||
} | ||
</style> | ||
<script src="./main.js" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
<p><a href="../../">[Home]</a> ↣ <a href="../">[Privacy Protections Tests]</a> ↣ <strong>[Query Parameters]</strong></p> | ||
|
||
<p>This page is a landing page for the query parameters tests. It is not intended to be used directly.</p> | ||
|
||
<div> | ||
<p>Results</p> | ||
<p>"<span id="results"></span>"</p> | ||
</div> | ||
</body> | ||
</html> |