0

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 to have my custom JavaScript loaded as if it was JavaScript from the original website.

2
  • Sounds questionable, why don't you tell us more about this. Commented Oct 2, 2011 at 19:56
  • I would like to add custom JavaScript on Wikipedia, as an extension. It would be a little tool/add-on to Wikipedia. Commented Oct 2, 2011 at 20:12

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Yeah, that would work. But is there a way to automate the process?
This should help: code.google.com/chrome/extensions/getstarted.html It's a tutorial from Google on making extensions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.