Skip to content

Instantly share code, notes, and snippets.

@grssam
Created Sep 6, 2012
Embed
What would you like to do?
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