From 0f5172a820a3a49a6027cb9b79f0ad720d6a7d43 Mon Sep 17 00:00:00 2001 From: Manuel Bouza Date: Sat, 30 Mar 2019 06:54:28 +0100 Subject: [PATCH] Read project identifier in asana service (#7) --- CHANGELOG.md | 3 ++- src/js/remoteServices.js | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaf7c6e..bf4d860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Change the default value of subdomain to `unset` to have a well-formed URL. -## [1.0.23] - 2019-03-28 +## [1.1.0] - 2019-03-28 ### Added +- Read project identifier from Asana project title - Add support for meistertask.com diff --git a/src/js/remoteServices.js b/src/js/remoteServices.js index be6a1b2..c274f1f 100644 --- a/src/js/remoteServices.js +++ b/src/js/remoteServices.js @@ -17,7 +17,14 @@ export default { document .querySelector(".ItemRow--focused textarea") ?.textContent?.trim() || - document.querySelector(".SingleTaskPane textarea")?.textContent?.trim() + document.querySelector(".SingleTaskPane textarea")?.textContent?.trim(), + projectId: document => { + const match = document + .querySelector(".ProjectPageHeader-projectName") + ?.textContent?.trim() + ?.match(/^\[(\w+)\]/) + return match && match[1] + } }, "github-pr": {