Randomblue
Randomblue

Reputation: 116303

JavaScript on third party website

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.

Upvotes: 0

Views: 751

Answers (1)

mowwwalker
mowwwalker

Reputation: 17362

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.

Upvotes: 1

Related Questions