views:

725

answers:

4

Is there a way in Firebug to start a new script file to apply to page? Basically I want to do work like I'd normally do on the Firebug console but be able to to paste in multi-line functions, etc. It doesn't seem like the console is amenable to that.

+9  A: 

Down in the lower-right corner of the FireBug UI you should see a red square icon with an up arrow. Use that and stretch it to a size you like.




Jason Bunting
Thanks, that's exactly what I was looking for! I feel silly now.
Greg
Not a problem - it's quite handy!
Jason Bunting
A: 

maybe not within firebug, but you could try some techniques similar to the jQuery bookmarklet.

bookmarklet link

A: 

What about this idea:

Assuming your page can already have script tags that reference jQuery and a 'Script Include' jQuery plugin, then in the Console you could arbitrarily do:

$.include('http://example.com/scripts/some_script.js');

micahwittman
Look, this answer is getting voted up and down. Interesting. I addressed the "a new script *file*" part of the question. In sports they call this an "assist". I agree with JasonBunting's answer getting the best rating overall, but why downvote - leave it at zero or explain reasoning for downvote.
micahwittman
Maybe because he is asking a question about Firebug and never mentions jQuery and yet your answer requires it; are you assuming he uses jQuery? i.e. your answer really doesn't address the user's problem, which is that he wants to do something with Firebug. For all you know, he is using MochiKit.
Jason Bunting
@JasonBunting first, thanks for comment/dialog. The benefit of user input on a site like this is not only to the questioner, but also the community. I didn't assume questioner was using jQuery, I said "Assuming...", which recognizes that I don't know all the context that may be relevant in all cases
micahwittman
Sure, I understand what you are saying about "assuming" these things...perhaps you could've written a comment under his question first and asked "are you using a particular framework?" before answering, I don't know.
Jason Bunting
A: 

I said a "technique similar to the jQuery bookmarklet" Not use it directly. It's a technique to inject javascript onto a page, the example just happens to use jQuery.

Why did you add this as an answer instead of a comment?!
Jason Bunting