Can chrome or other browsers be customized to run a local JavaScript file on all tabs open?

Viewed 93

Please how can i attach a JavaScript file to my chrome, so as any page loads it runs the code on that page?

Does chrome save the html pages it loads somewhere on local disk c that it can be accessed?

2 Answers

You can make a chrome extension to run your script.

solution 1:

As a previous user said, you can build your own extension and you can run it in chrome.

solution 2:

IF it is only a temporary task, you can click on F12 (open the DevTools) and click on Console. There you can paste your own javascript function / script that will be run in the current page.

Note this works only for the current page (where you have the console opened).

solution 3:

You might want to try and use Selenium https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd?hl=en

Related