• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. Hack the Chrome Ugly > 83. Add a New Command-Line Option

Add a New Command-Line Option

Customize the startup process and the process of starting windows by adding support for new command-line arguments.

The set of Firefox command-line arguments isn’t fixed. You can add more options if you want. In the complex case, new command-line options can be compiled up into dynamic link libraries using C/C++. It’s easier to use a simple JavaScript script, though. This hack shows how to implement the simple case. We’ll make a --my or /my option that displays a page stored in the install area on startup.

Preparation

The straightforward thing to do is to add an option that starts up a window of your own design. In order to do that quickly, you have to sidestep the Extensions system by hacking on the install area directly. You have to create a specific set of objects to make everything hang together properly.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint