I am working on building a Chrome extension that injects bits and pieces of JavaScript onto websites, a bit like AdBlock does.
What is the best way to develop/test my JavaScript code on third-party websites? I want开发者_如何学C to have my custom JavaScript loaded as if it was JavaScript from the original website.
You can use Chrome's developer console. Right click, go to inspect element, and go to console. Alternatively, press ctrl+shift+j.
You should write the code in notepad++ or a similar text editor and then copy it into the console and run it to test it.
精彩评论