Created
June 2, 2011 13:38
-
-
Save fumikito/1004440 to your computer and use it in GitHub Desktop.
Fluidで作成したRedmineのアプリでドックにバッジを表示するユーザースクリプト
This file contains hidden or 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
| /** | |
| * 自分の担当しているチケットを表示する Window > User Scriptで貼りつける | |
| * | |
| * @return void | |
| */ | |
| function getTicketCount(){ | |
| new Ajax.Request("http://tech.hametuha.org/issues.xml", { | |
| method: "get", | |
| parameters: { | |
| key: "Here_comes_your_api_key", | |
| limit: 100 | |
| }, | |
| onSuccess: function(httpObj){ | |
| window.fluid.dockBadge = (httpObj.status == "200") ? httpObj.responseXML.getElementsByTagName("issue").length : badge; | |
| } | |
| }); | |
| } | |
| getTicketCount(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment