0

I am developting chrome-extension. I try to inject script-tag using chrome.tabs.executeScript, but it occurs some error in specific URLs.

I use this page as reference, but there are many error-logs in console...

I know my extension won't work in the Chrome web store or on Chrome internal pages, and I'm ok with that, but that display makes it look to users like the extension is broken. I want to avoid errors in some way (for exmaple, URL access filter??), but I don't know what to do.

Can anyone give me some advices??

chrome.tabs.executeScript(e.tabId, {"allFrames": false, "matchAboutBlank": true, "runAt": 'document_start', "frameId": e.frameId, "file": "/inject.js"}, function(){
  if(chrome.runtime.lastError){
    console.error(chrome.runtime.lastError.message)
  }       
})

enter image description here

Pirikara
  • 343
  • 3
  • 12

0 Answers0