fix/trello-and-asana (#38)

* Attach click event listener to window

* Update development server port

* Asana: Read project identifier from topbar page header

* Pump version and update changelog
This commit is contained in:
Manuel Bouza 2019-12-10 21:00:22 +01:00 committed by Tobias Miesel
parent 1dcda94483
commit 1447fd6116
5 changed files with 12 additions and 5 deletions

View File

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.3.3] - 019-10-17
### Fixed
- Fix an issue on Trello where the card closes when clicking the MOCO bubble
- Asana: read project title from page heading
## [1.3.2] - 2019-10-24 ## [1.3.2] - 2019-10-24
### Added ### Added

View File

@ -1,7 +1,7 @@
{ {
"name": "moco-browser-extensions", "name": "moco-browser-extensions",
"description": "Browser plugin for MOCO", "description": "Browser plugin for MOCO",
"version": "1.3.2", "version": "1.3.3",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"start": "yarn start:chrome", "start": "yarn start:chrome",

View File

@ -5,7 +5,7 @@ const baseURL = subdomain => {
if (process.env.NODE_ENV === "production") { if (process.env.NODE_ENV === "production") {
return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions` return `https://${encodeURIComponent(subdomain)}.mocoapp.com/api/browser_extensions`
} else { } else {
return `http://${encodeURIComponent(subdomain)}.mocoapp.localhost:3001/api/browser_extensions` return `http://${encodeURIComponent(subdomain)}.mocoapp.localhost:3000/api/browser_extensions`
} }
} }

View File

@ -22,7 +22,7 @@ chrome.runtime.onConnect.addListener(function(port) {
} }
port.onDisconnect.addListener(() => { port.onDisconnect.addListener(() => {
messenger.stop() messenger.stop()
document.removeEventListener("click", clickHandler, true) window.removeEventListener("click", clickHandler, true)
}) })
function updateBubble({ service, bookedSeconds, settingTimeTrackingHHMM, timedActivity } = {}) { function updateBubble({ service, bookedSeconds, settingTimeTrackingHHMM, timedActivity } = {}) {
@ -30,7 +30,7 @@ chrome.runtime.onConnect.addListener(function(port) {
const domRoot = document.createElement("div") const domRoot = document.createElement("div")
domRoot.setAttribute("id", "moco-bx-root") domRoot.setAttribute("id", "moco-bx-root")
document.body.appendChild(domRoot) document.body.appendChild(domRoot)
document.addEventListener("click", clickHandler, true) window.addEventListener("click", clickHandler, true)
} }
ReactDOM.render( ReactDOM.render(

View File

@ -17,7 +17,7 @@ export default {
document.querySelector(".ItemRow--highlighted textarea")?.textContent?.trim() || document.querySelector(".ItemRow--highlighted textarea")?.textContent?.trim() ||
document.querySelector(".ItemRow--focused textarea")?.textContent?.trim() || document.querySelector(".ItemRow--focused textarea")?.textContent?.trim() ||
document.querySelector(".SingleTaskPane textarea")?.textContent?.trim(), document.querySelector(".SingleTaskPane textarea")?.textContent?.trim(),
projectId: projectIdentifierBySelector(".TaskProjectPill-projectName"), projectId: projectIdentifierBySelector(".TopbarPageHeaderStructure-titleRow h1"),
}, },
"github-pr": { "github-pr": {