1

If I don't have access to the development environment, then I want to have the opportunity to change front-end code on the fly by edit / replace / change javascript files. What I want is to just use the default webpage and just replace a javascript file with a local version.

I've tried adding javascript with this kind of code, with firebug:

$.getScript("mobile.js", function(){
    alert("Running test.js");
});

but how do I replace it with a local file?

I think this is possible with the tool "espresso" (mac users) .. any Windows alternative?

3
  • What exactly are you looking to achieve? Commented Dec 6, 2011 at 11:41
  • Espresso is just a web IDE. Are you asking if there are HTML/JS/CSS IDEs for Windows? Commented Dec 6, 2011 at 11:42
  • I want to change the page on the fly. If I do not have access to the development environment, then I have the opportunity to change front-end code on the fly by edit / replace / change javascript file. Commented Dec 6, 2011 at 11:48

1 Answer 1

1

I normally use Charles for this sort of thing. If you just want to replace one script with another, you can use the Map Local feature to remap a URL to a local file.

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

2 Comments

It works like a charm! Is it possible to add additional new local scripts when loading a webpage?
The Rewrite feature lets you run a regular expression over the response body. That could add a new <script> tag.

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.