2

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 :)

user2686101
  • 352
  • 1
  • 3
  • 13
  • possible duplicate of [jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)](http://stackoverflow.com/questions/18365315/jquerys-jquery-1-10-2-min-map-is-triggering-a-404-not-found) – Teepeemm Jul 04 '15 at 03:04

1 Answers1

3

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.

Community
  • 1
  • 1
Teepeemm
  • 4,331
  • 5
  • 35
  • 58
  • 2
    See also http://stackoverflow.com/questions/18365315/jquerys-jquery-1-10-2-min-map-is-triggering-a-404-not-found – rsanchez May 01 '14 at 15:52
  • Thank you guys. A good lesson. I should have focused more on jQuery other than content script security. – user2686101 May 02 '14 at 09:14