browser extension to replace JavaScript file on a live site for testing

前端 未结 11 1945
心在旅途
心在旅途 2021-02-07 04:57

I\'m looking for a browser extension (Firefox, Chrome) allowing to replace a Javascript file on a live Web site to do some testing/hacking.

Basically, it should take a U

相关标签:
11条回答
  • 2021-02-07 05:19

    Not sure if this helps or not, but I just encountered a chrome plugin called Resource Override, which sounds like it does something similar. Im trying out the Fiddler which someone else mentioned, but I think i'm also going to try this one at some point. https://chrome.google.com/webstore/detail/resource-override/pkoacgokdfckfpndoffpifphamojphii?hl=en

    0 讨论(0)
  • 2021-02-07 05:23

    Disclaimer: I'm the author of the software :-)

    A different approach that might suit your usecase better is to use a RoboHydra-based development proxy. The idea here would be that you want to keep ALL Javascript files in your machine, and use another server simply as a backend. It's great for eg. front-end developers that don't want to have the whole backend installed in their machines.

    You can see the documentation, tutorials and such at http://robohydra.org/, and have an article describing exactly that usecase at http://dev.opera.com/articles/view/robohydra-a-new-testing-tool-for-client-server-interactions/.

    However, as of now it can't proxy to HTTPS URLs, but that should be a trivial change that I intend to do soon anyway.

    0 讨论(0)
  • 2021-02-07 05:26

    Alternatives:

    • Using chrome you can change code on the fly (Developer tools -> Sources tab) and just save it (command + s)
    • Use the LiveReload app that actually attaches an extension (that kind of does what you want) http://livereload.com/

    This may not be the "exact" answer to your question, yet I almost sure one of those will do what you want to do.

    0 讨论(0)
  • 2021-02-07 05:31

    The Opera browser has similar functionality:

    1. View source code of the page (Ctrl+U).
    2. Make some changes. Or paste and replace the entire file.
    3. Press Apply Changes in the toolbar (Ctrl+R).

    For editing linked resources (such as javascript or CSS files), use the following approach:

    1. Open the linked resource in a new tab.
    2. View "source code" of the resource (Ctrl+U).
    3. Make some changes.
    4. Press Apply Changes in the toolbar (Ctrl+R).
    5. Return to the tab with the webpage and realod (Ctrl+R).
    0 讨论(0)
  • 2021-02-07 05:35

    Try http://www.fiddler2.com/fiddler2/version.asp

    It does that and much more. But it's not a browser extension.

    0 讨论(0)
提交回复
热议问题