Chrome Extension: How to solve "Not allowed to load local resource" error upon content script injection

StackOverflow https://stackoverflow.com/questions/23410754

  •  13-07-2023
  •  | 
  •  

Frage

I tried to inject jQuery to content page to make easy access to DOM elements.
The code was something like below

chrome.tabs.executeScript(tabId, { file: "jquery.min.js"} ,function(){
    chrome.tabs.executeScript(tabId, { file: myOwnScript.js});}
); 

It was all fine on Windows, but on Ubuntu, in content page window, I always get console error message saying
"Not allowed to load local resource: file:///****/jquery.min.map"

I noted it was talking about *.map but not *.js

There are some more mysteies:
1. There is no error message on myOwnScript.js
2. My extension works well even though this message keeps showing at each page load.

I made plenty searches on Google but didn't find similar case.

My questions is,
1. What is the reason of such error?
2. Should I take it as a serious error?

My enviroment is as below
OS : Ubuntu 14.04, with LXDE desktop
Chrome : 34.0.1847.132
(Didn't try other configurations because I am not that good at customizing Linux :)

War es hilfreich?

Lösung

Previous versions of Jquery have a comment pointing to the map file (so that a bug in jquery.min.js can be translated to a bug in the readable jquery.js). You can safely delete this comment, or upgrade to a more recent version of Jquery, which has removed this comment (for exactly this reason). See also this answer.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top