var security_url = window.location.origin + "/.well-known/security.txt"
fetch(security_url).then(function (response){
return response
}).then(function (res){
if (res.ok){
// there is
fetch(security_url+Math.random()).then(function (response){
return response
}).then(function (response){
if (res.status == response.status) {
// It says bullshit
console.log('Hehe')
return browser.runtime.sendMessage({ icon_state: 0 });
}
console.log('Hehe')
browser.runtime.sendMessage({ icon_state: 1 });
})
console.log('Hehe')
return browser.runtime.sendMessage({ icon_state: 1 });
} else {
// there no!
console.log('Hehe')
return browser.runtime.sendMessage({ icon_state: 0 });
}
})