Skip to content

Commit 2271678

Browse files
fix(Xero): Fix showing Toggl Button in Xero (#2022)
* fix(Xero): Fix showing Toggl Button in Xero * Update origins.js
1 parent c24a7fe commit 2271678

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/content/xero.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
/**
2+
* @name Xero
3+
* @urlAlias xero.com
4+
* @urlRegex '*://*.xero.com/*'
5+
*/
16
'use strict';
27

3-
togglbutton.render('.xrh-header--main:not(.toggl)', {}, function (elem) {
4-
const container = $('.xrh-addons');
8+
togglbutton.render('.xnav-header--main:not(.toggl)', {}, function (elem) {
9+
const container = $('.xnav-addons');
510
let descriptionNode;
611

712
if ($('#page_title h1')) {
@@ -50,7 +55,7 @@ togglbutton.render('.xrh-header--main:not(.toggl)', {}, function (elem) {
5055
const div = createTag('div', 'xrh-focusable--child xrh-iconwrapper');
5156
div.appendChild(link);
5257

53-
const button = createTag('button', 'xrh-button xrh-addon--iconbutton xrh-header--iconbutton xrh-focusable--parent');
58+
const button = createTag('button', 'xnav-header-button xnav-addon--iconbutton xnav-header--iconbutton xnav-focusable--parent');
5459
button.type = 'button';
5560

5661
button.addEventListener('click', function (e) {
@@ -60,11 +65,11 @@ togglbutton.render('.xrh-header--main:not(.toggl)', {}, function (elem) {
6065

6166
button.appendChild(div);
6267

63-
const liTag = createTag('li', 'xrh-addon');
68+
const liTag = createTag('li', 'xnav-addon');
6469
liTag.appendChild(button);
6570

6671
if (container) {
67-
const userIcon = $('[data-automationid="xrh-addon-user"]', container);
72+
const userIcon = $('[data-automationid="xnav-addon-user"]', container);
6873
container.insertBefore(liTag, userIcon);
6974
}
7075
});

src/origins.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,9 @@ export default {
720720
name: 'Wunderlist'
721721
},
722722
'xero.com': {
723-
url: '*://*.xero.com/*',
724-
name: 'Xero'
723+
url: ''*://*.xero.com/*'',
724+
name: 'Xero',
725+
file: 'xero.js'
725726
},
726727
'myjetbrains.com': {
727728
url: '*://*.myjetbrains.com/*',

0 commit comments

Comments
 (0)