Skip to content

Instantly share code, notes, and snippets.

@grssam
Created September 6, 2012 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grssam/3654042 to your computer and use it in GitHub Desktop.
Save grssam/3654042 to your computer and use it in GitHub Desktop.
Exit command for GCLI
Components.utils.import("resource:///modules/devtools/gcli.jsm");
gcli.addCommand({
name: "exit",
description: "Exits GCLI and closes the Developer Toolbar",
returnType: "null",
exec: function Exit(args, context) {
let window = context.environment.chromeDocument.defaultView;
let document = window.document;
let tmp = {};
Components.utils.import("resource:///modules/devtools/DeveloperToolbar.jsm", tmp);
let toolbar = new tmp.DeveloperToolbar(window, document.getElementById("developer-toolbar"));
toolbar.hide();
tmp = null;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment