Skip to content

Instantly share code, notes, and snippets.

@zombie
Created June 27, 2012 00:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zombie/3000409 to your computer and use it in GitHub Desktop.
Save zombie/3000409 to your computer and use it in GitHub Desktop.
firefox GCLI bug command
Components.utils.import("resource:///modules/devtools/gcli.jsm");
/*
* bugzilla command
* use: bug #id
*/
gcli.addCommand({
name: 'bug',
description: 'Shows a Mozilla Bugzilla bug',
params: [
{
name: 'num',
type: 'number',
description: 'bug id'
}
],
exec: function(args, context) {
let gBrowser = context.environment.chromeDocument.defaultView.gBrowser;
let url = "https://bugzilla.mozilla.org/show_bug.cgi?id=" + args.num;
gBrowser.selectedTab = gBrowser.addTab(url);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment