diff --git a/README.md b/README.md index efbbf4e..489a65e 100755 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ This is a bookmarklet you - FogBugz cases - JIRA issues - GitHub issues and commits + - Drupal.org issues - The selected text from an arbitrary URL - ... more? I'm happy to take pull requests that add support for other websites! @@ -21,7 +22,7 @@ issues/cases/whatever directly to Trello in a single click. The card created in Trello will -- attempt to use the name of the FogBugz/JIRA/GitHub/etc case +- attempt to use the name of the FogBugz/JIRA/GitHub/Drupal/etc case - include a link to the case in the card description - (optionally) include any selected text in the description @@ -31,4 +32,4 @@ and prepending `javascript:` to the front. If you'd rather not add your appKey and idList for every new domain, you can modify the bookmarklet and include values for `window.trelloAppKey` and `window.trelloIdList` (currently both have the value `"optional"`) -**Note:** This basic concept originated with https://github.com/markdrago/cardorizer; this approach doesn't require you to run a server \ No newline at end of file +**Note:** This basic concept originated with https://github.com/markdrago/cardorizer; this approach doesn't require you to run a server diff --git a/trello_bookmarklet.js b/trello_bookmarklet.js index 781df94..3dd0955 100755 --- a/trello_bookmarklet.js +++ b/trello_bookmarklet.js @@ -43,6 +43,12 @@ // We're looking at a GitHub commit name = $(".js-current-repository").text().trim() + ": " + $(".commit .commit-title").text().trim(); + } else if ($("#block-project-issue-issue-metadata").length) { + + // We're looking at a Drupal.org issue + name = "[" + $(".field-name-field-project .field-item").text().trim() + "] " + $("#page-subtitle").text().trim(); + desc = "Issue: " + location.href; + } else if (jQuery('head meta[content=Redmine]').length) { // We're looking at a redmine issue