Created
September 6, 2012 09:49
-
-
Save grssam/3654042 to your computer and use it in GitHub Desktop.
Exit command for GCLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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