@ -420,9 +420,11 @@ define([
$ . ajax ( '/?' + ( + new Date ( ) ) , {
$ . ajax ( '/?' + ( + new Date ( ) ) , {
complete : function ( xhr ) {
complete : function ( xhr ) {
var header = xhr . getResponseHeader ( 'permissions-policy' ) ;
var header = xhr . getResponseHeader ( 'permissions-policy' ) || '' ;
var rules = header . split ( ',' ) ;
if ( rules . includes ( 'interest-cohort=()' ) ) { return void cb ( true ) ; }
printMessage ( JSON . stringify ( header ) ) ;
printMessage ( JSON . stringify ( header ) ) ;
cb ( header === 'interest-cohort=()' || header ) ;
cb ( header ) ;
} ,
} ,
} ) ;
} ) ;
} ) ;
} ) ;
@ -896,6 +898,18 @@ define([
} ) ;
} ) ;
} ) ;
} ) ;
assert ( function ( cb , msg ) {
msg . appendChild ( h ( 'span' , 'pewpew' ) ) ;
deferredPostMessage ( {
command : 'CHECK_HTTP_STATUS' ,
content : {
url : cacheBuster ( '/api/config' ) ,
} ,
} , function ( content ) {
cb ( content === 200 || content ) ;
} ) ;
} ) ;
/ *
/ *
assert ( function ( cb , msg ) {
assert ( function ( cb , msg ) {
setWarningClass ( msg ) ;
setWarningClass ( msg ) ;