Мое расширение Chrome выдает ошибку, если я пытаюсь открыть popup.html в chrome: // urls.
Я установил функцию обратного вызова, чтобы предотвратить это:
/ Inject the payload.js script into the current tab after the popout has loaded
window.addEventListener('load', function (evt) {
// catching injecting into chrome:// pages error
chrome.extension.getBackgroundPage().chrome.tabs.executeScript(null, {
file: 'js/payload.js'
}, ()=>{
if(chrome.runtime.lastError) {
console.log("injecting error");
}
});;
});
Однако ошибка все еще появляется.Есть ли способ разрешить "chrome://*/"
в моем файле манифеста?