|
|
@ -391,21 +391,32 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
assert(function (cb, msg) {
|
|
|
|
assert(function (cb, msg) {
|
|
|
|
setWarningClass(msg);
|
|
|
|
setWarningClass(msg);
|
|
|
|
msg.appendChild(h('span', [
|
|
|
|
|
|
|
|
"You haven't opted out of participation in Google's ",
|
|
|
|
var printMessage = function (value) {
|
|
|
|
code('FLoC'),
|
|
|
|
msg.appendChild(h('span', [
|
|
|
|
" targeted advertizing network. This can be done by adding a ",
|
|
|
|
"This instance hasn't opted out of participation in Google's ",
|
|
|
|
code('permissions-policy'),
|
|
|
|
code('FLoC'),
|
|
|
|
" HTTP header with a value of ",
|
|
|
|
" targeted advertizing network. ",
|
|
|
|
code('interest-cohort=()'),
|
|
|
|
|
|
|
|
" in your reverse proxy's configuration. See the provided NGINX configuration file for an example. ",
|
|
|
|
"This can be done by setting a ",
|
|
|
|
h('p', [
|
|
|
|
code('permissions-policy'),
|
|
|
|
link("https://www.eff.org/deeplinks/2021/04/am-i-floced-launch", 'Learn more'),
|
|
|
|
" HTTP header with a value of ",
|
|
|
|
]),
|
|
|
|
code('"interest-cohort=()"'),
|
|
|
|
]));
|
|
|
|
" in the configuration of its reverse proxy instead of the current value (",
|
|
|
|
|
|
|
|
code(value),
|
|
|
|
|
|
|
|
"). See the provided NGINX configuration file for an example. ",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h('p', [
|
|
|
|
|
|
|
|
link("https://www.eff.org/deeplinks/2021/04/am-i-floced-launch", 'Learn more'),
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
]));
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax('/?'+ (+new Date()), {
|
|
|
|
$.ajax('/?'+ (+new Date()), {
|
|
|
|
complete: function (xhr) {
|
|
|
|
complete: function (xhr) {
|
|
|
|
cb(xhr.getResponseHeader('permissions-policy') === 'interest-cohort=()');
|
|
|
|
var header = xhr.getResponseHeader('permissions-policy');
|
|
|
|
|
|
|
|
printMessage(JSON.stringify(header));
|
|
|
|
|
|
|
|
cb(header === 'interest-cohort=()' || header);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -735,11 +746,18 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var failureReport = function (obj) {
|
|
|
|
var failureReport = function (obj) {
|
|
|
|
|
|
|
|
var printableValue = obj.output;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
printableValue = JSON.stringify(obj.output);
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
console.error(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return h('div.error', [
|
|
|
|
return h('div.error', [
|
|
|
|
h('h5', obj.message),
|
|
|
|
h('h5', obj.message),
|
|
|
|
h('table', [
|
|
|
|
h('table', [
|
|
|
|
row(["Failed test number", obj.test + 1]),
|
|
|
|
row(["Failed test number", obj.test + 1]),
|
|
|
|
row(["Returned value", obj.output]),
|
|
|
|
row(["Returned value", code(printableValue)]),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
};
|
|
|
|
};
|
|
|
|