<!DOCTYPE html>
<html>
<head>
<script>
function run() {
const params = new URLSearchParams(document.location.search);
const policy = params.get('policy');
const destination = params.get('redirect');
const shouldUseLink = params.get('link');
const target = params.get('target');
if (policy != "no-meta") {
const meta = document.createElement("meta");
meta.name = "referrer";
meta.content = policy;
document.head.appendChild(meta);
}
if (shouldUseLink == "true") {
const link = document.createElement("a");
link.innerText = "link";
link.target = target;
link.href = destination;
document.body.appendChild(link);
} else {
document.location = destination;
}
}
</script>
</head>
<body onload="run()">
</body>
</html>