fcortes
fcortes

Reputation: 1368

Automatically execute a javascript line before starting the Firebug console

Usually, in the linux/unix terminal is possible to initialize the console with a predeterminated line of code. I'm using the javascript console with Firebug, and I asked if it is possible with the Firebug's javascript console (Some script maybe...).

Edit 1:

An example:

Initially, when I start Firebug's javascript console, the Jquery library cannot be used with $, because Jquery is a namespace in my project, so I have to program a line of code for using the terminal the simbol $ as Jquery (something like $=PROJECT.NAME.$);

I want to obviate this line of code for each time I refresh Firefox.

Upvotes: 0

Views: 498

Answers (1)

Richard Dillman
Richard Dillman

Reputation: 334

If you don't want to reassign $ in the code, I'd suggest creating a bookmarklet to execute the re-assignment. You'll have to click the bookmarklet every time you open Firebug.

Name: $ reassign

URL: javascript:$=PROJECT.NAME.$

(A bookmarklet is created the same way you would create a bookmark, but instead of opening a webpage, it executes the javascript in the URL.)

Upvotes: 2

Related Questions