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?
-
1Why would you want to replace the path?Soubhik Mondal– Soubhik Mondal2016-05-15 09:41:27 +00:00Commented May 15, 2016 at 9:41
-
You can't - consider the security implications if we all started replacing websites code with our own.Andy– Andy2016-05-15 09:47:22 +00:00Commented May 15, 2016 at 9:47
-
Possible duplicate of browser extension to replace JavaScript file on a live site for testingJeremy J Starcher– Jeremy J Starcher2016-05-15 09:50:03 +00:00Commented May 15, 2016 at 9:50
Add a comment
|