1

I'm using the Chrome browser and I'm trying to edit running JavaScript which resides directly in an HTML file (the HTML file is served by an external host). I'd like it to be simple like changing HTML/CSS, yes I know JavaScript is different because it is stateful and it cannot be compared to HTML/CSS but still Chrome supports changing external js files, it just doesn't like when you tamper with inline JavaScript.

Possible solutions which I've thought already:

  • Greasemonkey / TamperMonkey / Injecting my own at runtime: Won't solve my problems because the script is nested into an anonymous scope and can't be accessed from outside.

  • Man in the middle proxy: Not feasible in the long run, and it takes too much to setup just for what I have to do (I'll keep it as last resort).

How can I solve this problem?

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
Warrior
  • 563
  • 1
  • 6
  • 20