Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

Use with Conkeror

retroj edited this page Dec 6, 2010 · 10 revisions

To use MozRepl in Conkeror , add the following to your .conkerorrc:


// Mozrepl
//
if ('@hyperstruct.net/mozlab/mozrepl;1' in Cc) {
  var mozrepl = Cc['@hyperstruct.net/mozlab/mozrepl;1']
    .getService(Ci.nsIMozRepl);
  if (! mozrepl.isActive())
    mozrepl.start(4242);
}

or: (restart will be necessary)


user_pref('extensions.mozrepl.autoStart', true);

or, for one time use:


conkeror -repl

Setting up the repl environment

When hacking Conkeor, you will probably want MozRepl to automatically enter Conkeror’s application context at startup. To do this, first make a file called ~/.mozrepl-conkeror.js which contains the following:


var conkeror = Cc["@conkeror.mozdev.org/application;1"]
    .getService().wrappedJSObject;
this.enter(conkeror);

Then put the following code in your ~/.conkerorrc:


let (mozrepl_init = get_home_directory()) {
    mozrepl_init.appendRelativePath(".mozrepl-conkeror.js");
    session_pref('extensions.mozrepl.initUrl', make_uri(mozrepl_init).spec);
}