How do you replace a Javascript source file from server with a local javascript source file using javascript code locally without using plugins?
For example: You visit a site like www.example.com
and you view source. In the source you find this <script src="https://www.example.com/myscript.js?val=11111er1"></script>
. How would you replace it with something like <script src="C:/scripts/mynewscript.js?val=11111er1"><script>
so that the site uses "mynewscript.js" in C drive instead of "myscript.js" from server?
Asked
Active
Viewed 399 times
1

henrykorir
- 107
- 1
- 12
-
1Why would you want to replace the path? – Soubhik Mondal May 15 '16 at 09:41
-
You can't - consider the security implications if we all started replacing websites code with our own. – Andy May 15 '16 at 09:47
-
Possible duplicate of [browser extension to replace JavaScript file on a live site for testing](http://stackoverflow.com/questions/3093150/browser-extension-to-replace-javascript-file-on-a-live-site-for-testing) – Jeremy J Starcher May 15 '16 at 09:50