简体   繁体   中英

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.

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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM