From e91a43e1d0af96ed36a8e95d42706bbfcaf0c5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurids=20Du=CC=88llmann?= Date: Sun, 4 Oct 2020 14:02:10 +0200 Subject: [PATCH] feat(hellonext): Add Hellonext integration --- README.md | 1 + src/scripts/content/hellonext.js | 23 +++++++++++++++++++++++ src/scripts/origins.js | 4 ++++ src/styles/style.css | 10 ++++++++++ 4 files changed, 38 insertions(+) create mode 100644 src/scripts/content/hellonext.js diff --git a/README.md b/README.md index 0b7b86ef7..b94bfd349 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ out of the way and focus on real work. - [GQueues](https://www.gqueues.com/) - [Habitica](https://habitica.com) - [HEFLO](https://app.heflo.com/) +- [Hellonext](https://hellonext.co/) - [Helprace](https://helprace.com/) - [Help Scout](http://www.helpscout.net/) - [Husky](https://www.huskymarketingplanner.com/) diff --git a/src/scripts/content/hellonext.js b/src/scripts/content/hellonext.js new file mode 100644 index 000000000..5dfdb78bd --- /dev/null +++ b/src/scripts/content/hellonext.js @@ -0,0 +1,23 @@ +'use strict'; + +togglbutton.render( + '.feedback-wrapper > div:not(.d-flex) .text-muted.smaller:not(.toggl)', + { observe: true }, + function (elem) { + const description = function () { + return document.querySelector('.feedback-wrapper h5.feedback-single-title').textContent; + }; + + const project = function () { + const projectSelect = document.querySelector('#bucket'); + return projectSelect.options[projectSelect.selectedIndex].textContent; + }; + + const link = togglbutton.createTimerLink({ + className: 'hellonext', + description: description, + projectName: project + }); + + elem.appendChild(link, elem); + }); diff --git a/src/scripts/origins.js b/src/scripts/origins.js index 770f4ebce..b6b686fde 100644 --- a/src/scripts/origins.js +++ b/src/scripts/origins.js @@ -252,6 +252,10 @@ export default { url: '*://app.heflo.com/*', name: 'HEFLO' }, + 'hellonext.co': { + url: '*://*.hellonext.co/*', + name: 'Hellonext' + }, 'helprace.com': { url: '*://*.helprace.com/*', name: 'Helprace' diff --git a/src/styles/style.css b/src/styles/style.css index 90694b8e6..f1e90dc1a 100644 --- a/src/styles/style.css +++ b/src/styles/style.css @@ -1327,6 +1327,16 @@ li .toggl-button.heflo { height: 60px; } +/********* Hellonext *********/ +.toggl-button.hellonext { + color: #586069; + font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-size: 1em; + margin-left: 0.5rem; + text-decoration: none; + font-weight: 400; +} + /********* SENTRY *********/ .toggl-button.sentry { margin: 0 auto 20px 10px;