Created
February 11, 2009 03:55
-
-
Save amau96/61813 to your computer and use it in GitHub Desktop.
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
CmdUtils.CreateCommand({ | |
name: "bugzillathis", | |
icon:"http://www.geckozone.org/favicon.ico", | |
takes: {"input": noun_arb_text}, | |
homepage: "http://gist.github.com/61813", | |
author: { name: "A.BLANC", email: "amau96@gmail.com"}, | |
license: "MPL", | |
description: "quick link to bugzilla", | |
preview: function(previewBlock,input) { | |
previewBlock.innerHTML ="Welcome to the bugzilla quicklink, please enter bug's number"; | |
url="https://bugzilla.mozilla.org/show_bug.cgi?id="+input.text; | |
if(input.text!=""){ | |
previewBlock.innerHTML =""; | |
Utils.parseRemoteDocument( | |
url, // URL | |
null, // post data | |
function(doc) { // success callback | |
previewBlock.innerHTML = "Bug : "+input.text +"<br />Description : "+ jQuery("#summary_alias_container", doc).html(); | |
}, | |
function() { // error callback | |
previewBlock.innerHTML = "Error!"; | |
} | |
); | |
} | |
}, | |
execute: function(input) { | |
url="https://bugzilla.mozilla.org/show_bug.cgi?id="+input.text; | |
Utils.openUrlInBrowser(url); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment