0

I'm familiar with the include() solution for loading JavaScript via Firebug. The problem I have with it is that the scripts I include using this feature do not remain between page loads. As soon as I reload it appears I have to include the script again.

For reasons I won't go into, I do not have the ability to simply add the scripts directly to the page I'm debugging. Is there a place where js files hosted locally or online can be specified to be pulled in to whatever page I load in my browser?

Community
  • 1
  • 1
Keyslinger
  • 4,903
  • 7
  • 42
  • 50
  • you describe greasemonkey, or html script tags. you can also use a bookmarklet injector to make loading a one-click thing, nearly automatic. – dandavis Jan 28 '15 at 00:17
  • Thanks, @dandavis how is this done? – Keyslinger Jan 28 '15 at 00:20
  • which one? greasemonkey you install. bookmarklets you write yourself and use the firebug console's [copy] button to turn your loader snippet into a url-safe bookmarklet string. – dandavis Jan 28 '15 at 00:22

2 Answers2

0

You can use Fiddler for that, free web debugging proxy. Just read Injecting JavaScript into head element of website using Fiddler

Community
  • 1
  • 1
ZqBany
  • 201
  • 1
  • 5
  • This is super nice to know about. Unfortunately, I'm connecting to the site via VPN :-( – Keyslinger Jan 28 '15 at 00:30
  • @Keyslinger Fiddler 2.2.0.3 and later have option that allows automatic monitoring of dialup or VPN connections [link](http://docs.telerik.com/fiddler/configure-fiddler/tasks/MonitorDialupAndVPN) – ZqBany Jan 28 '15 at 12:01
0

There is no such option in Firebug at the moment (version 2.0.7). Though there is a request to add this feature together with a snippet command in issue 6201.

For now you can use the aliasing functionality, so you at least don't have to add the URL again and again. The initial call then looks like this:

include("http://code.jquery.com/jquery-latest.min.js", "jquery")

For all subsequent calls you just have to type this:

include("jquery")

These aliases are saved persistently, so they also work after a browser restart.

This doesn't make the call automatic, though it at least saves some time when including a script manually.

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132