From 754d33f937be12b888989951da96373bc2f06642 Mon Sep 17 00:00:00 2001 From: joelthorner Date: Wed, 11 Sep 2019 17:54:29 +0200 Subject: [PATCH 1/2] Fix "method_lines" issue in js/inject/zendesk/ticket-consume.js #186 --- js/inject/zendesk/ticket-consume.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/js/inject/zendesk/ticket-consume.js b/js/inject/zendesk/ticket-consume.js index 970b4762..0d5f762b 100644 --- a/js/inject/zendesk/ticket-consume.js +++ b/js/inject/zendesk/ticket-consume.js @@ -76,8 +76,7 @@ TicketConsume = { chrome.runtime.onMessage.addListener(function (message, sender) { try { var data = JSON.parse(message.data); - log('TicketConsume intranet', 'success'); - console.log(data); + log('TicketConsume intranet', 'success'); console.log(data); $.extend(true,TicketConsume.data, data) $(document).off('DOMSubtreeModified').on('DOMSubtreeModified', function (event) { @@ -85,23 +84,20 @@ TicketConsume = { $('[data-test-id="customercontext-userinfo-organization"] [href*="organizations"]').each(function (index, ticketOrg) { let $ticketOrg = $(ticketOrg); if (typeof $ticketOrg.data('ovserved-org') === 'undefined') { - + $ticketOrg.data('ovserved-org', true); let findOrgId = $ticketOrg.attr('href').match(/\d{1,}/); - if (findOrgId) { let orgId = findOrgId[0], orgName = $ticketOrg.text().trim().toLowerCase(); - TicketConsume.observerInit(orgId, orgName, $ticketOrg); } } - }) + }); TicketConsume.initIntervals(); } }); } catch (error) { - log('TicketConsume invalid data', 'danger'); - console.log(message.data); + log('TicketConsume invalid data', 'danger'); console.log(message.data); } }); }, From 595480b7516a88133b74f582211bed0d24843dbd Mon Sep 17 00:00:00 2001 From: joelthorner Date: Wed, 11 Sep 2019 17:54:36 +0200 Subject: [PATCH 2/2] Update changelog.js --- js/options/changelog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/options/changelog.js b/js/options/changelog.js index e9f0209d..220529dc 100644 --- a/js/options/changelog.js +++ b/js/options/changelog.js @@ -3,7 +3,8 @@ const CHANGELOG = [ version: 'v2.3.15', date: '10 Sep 2019', lines: [ 'FIXED Fix multiple open windows by TicketConsume (Zendesk) #188', - 'IMPROVED Gulp automatic version replace (dev) #189' + 'IMPROVED Gulp automatic version replace (dev) #189', + 'FIXED Fix "method_lines" issue in js/inject/zendesk/ticket-consume.js #186' ] }, { version: 'v2.3.14', date: '04 Sep 2019',