Make sure add "<all_urls>'' and "webRequestBlocking" to permissions section in manifest file.
chrome.webRequest.onAuthRequired.addListener( function(details, callbackFn) { console.log("onAuthRequired!", details, callbackFn); callbackFn({
authCredentials: {
username: base64.decode('eGlldG9uZw'),
password: base64.decode('eGlldG9uZzEyMw==')} });
},
{ urls: ["<all_urls>"] },
['asyncBlocking']
);
网友评论