Skip to content

Commit

Permalink
feat: Add Bugsnag integration
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorbitzer authored and Phenome committed Nov 3, 2021
1 parent d45b391 commit bb4634c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -21,6 +21,7 @@ out of the way and focus on real work.
- [Breeze](http://www.breeze.pm/)
- [BrokerEngine](https://www.brokerengine.com.au/)
- [Bugherd](https://www.bugherd.com/)
- [Bugsnag](https://www.bugsnag.com/)
- [Bugzilla](https://bugzilla.mozilla.org/)
- [CapsuleCRM](http://www.capsulecrm.com/)
- [ClickUp](https://clickup.com/)
Expand Down
18 changes: 18 additions & 0 deletions src/scripts/content/bugsnag.js
@@ -0,0 +1,18 @@
'use strict';
/* global togglbutton, $ */

togglbutton.render(
'.ErrorShowHeadline:not(.toggl)',
{ observe: true },
el => {
const link = togglbutton.createTimerLink({
className: 'bugsnag',
description: descriptionSelector
});

$('.ErrorShowHeadline-errorClassContext .ExpandableLine-content', el).appendChild(link);
}
);

const descriptionSelector = el =>
['.EventText-errorClass', '.EventText-errorLocation'].map(s => $(s, el).textContent.trim()).join(' ');
4 changes: 4 additions & 0 deletions src/scripts/origins.js
Expand Up @@ -75,6 +75,10 @@ export default {
name: 'BugHerd',
file: 'bugherd.js'
},
'app.bugsnag.com': {
url: '*://app.bugsnag.com/*',
name: 'Bugsnag'
},
'bugzilla.mozilla.org': {
url: '*://bugzilla.mozilla.org/*',
name: 'Bugzilla'
Expand Down
5 changes: 5 additions & 0 deletions src/styles/style.css
Expand Up @@ -1562,3 +1562,8 @@ body.notion-body.dark .toggl-button.notion {
position: relative;
top: -3px;
}

/********* Bugsnag *********/
.toggl-button.bugsnag {
margin-left: 1rem;
}

0 comments on commit bb4634c

Please sign in to comment.