Refresh every tab when the extension is ready to force proper contextual identity

This commit is contained in:
idk
2020-09-21 13:44:26 -04:00
parent cf7d137d00
commit c89bfa8f1e

View File

@@ -625,6 +625,19 @@ var coolheadersSetup = function(e) {
}
function reloadTabs(tabs) {
for (let tab of tabs) {
browser.tabs.reload(tab.id)
}
}
function reloadError(error) {
console.log(`Error: ${error}`);
}
let querying = browser.tabs.query({});
querying.then(reloadTabs, onError);
// Listen for onHeaderReceived for the target page.
// Set "blocking" and "responseHeaders".