File: commandline.js

package info (click to toggle)
conkeror 0.9~git080629-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,132 kB
  • ctags: 906
  • sloc: sh: 340; ansic: 246; xml: 105; makefile: 77
file content (31 lines) | stat: -rw-r--r-- 1,055 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
 * (C) Copyright 2007 John J. Foerch
 * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
 *
 * Use, modification, and distribution are subject to the terms specified in the
 * COPYING file.
**/

const Cc = Components.classes;
const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");

function cmdline() {}
cmdline.prototype = {
    handle: function (cmdline) {
        cmdline.preventDefault = true;
        var conkeror = Cc["@conkeror.mozdev.org/application;1"].getService().wrappedJSObject;
        conkeror.handle_command_line(cmdline);
    },
    QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
    contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=conkeror",
    classID: Components.ID("{0f4dd758-b55a-4386-a79c-8698642eac51}"),
    classDescription: "clh_conkeror",
    _xpcom_categories: [{
            category: "command-line-handler",
            entry: "y-conkeror"
        }]
};

function NSGetModule(compMgr, fileSpec)
    XPCOMUtils.generateModule([cmdline]);