Google Chrome: JQuery content script on Facebook

前端 未结 1 1913
执笔经年
执笔经年 2020-12-18 09:50

I am using Google Chrome and I\'m writing a browser extension. I\'m trying to inject JQuery 2.0.3 into facebook as a context script. Just to see if I could, I\'m trying to g

相关标签:
1条回答
  • 2020-12-18 10:10

    You are accessing a $() function defined in the Facebook page, which has nothing to do with jQuery. To access the execution context of you content scripts from the javascript console, you need to select it from the drop down box located at the bottom of the window:

    Bottom bar of Developer Tools

    Instead of <page context>, you have to select chrome-extension://<your extension id>.

    0 讨论(0)
提交回复
热议问题