javascript - Why content.js load twice or more when in facebook.com with chrome extension? -


i have chrome extension. manifest.json is

"content_scripts": [      {         "all_frames": true,         "js": [ "content.js" ],         "css": ["style.css"],         "matches": [ "*://www.facebook.com/*"],         "run_at": "document_start"     },  

the content.js is

console.log("say hi"); 

and console please see picture http://i.imgur.com/subnbnt.png

it called 4 times. happened in facebook.com, not happened in other website such www.google.com. idea? thanks.

i'm not sure if facebook uses frames, if possible there 4 frames executing code once each. chrome console doesn't give visual indication happening. try setting all_frames false executes on top frame.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -