From 155c4b832281348c16be1f4ef667e6e23dbf1bd8 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Fri, 27 Aug 2021 18:13:24 +0530 Subject: chore: normalized all recipes to ensure compatibility with es6 (#639) - Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm. --- recipes/jira/index.js | 7 ++----- recipes/jira/package.json | 2 +- recipes/jira/webview.js | 8 +++----- 3 files changed, 6 insertions(+), 11 deletions(-) (limited to 'recipes/jira') diff --git a/recipes/jira/index.js b/recipes/jira/index.js index 9fd312d..038749a 100644 --- a/recipes/jira/index.js +++ b/recipes/jira/index.js @@ -1,8 +1,5 @@ -module.exports = (Franz) => class Jira extends Franz { +module.exports = (Ferdi) => class Jira extends Ferdi { overrideUserAgent() { - return window.navigator.userAgent.replace( - /(Ferdi|Electron)\/\S+ \([^)]+\)/g, - '', - ); + return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(); } }; diff --git a/recipes/jira/package.json b/recipes/jira/package.json index 4a4ded5..09ace99 100644 --- a/recipes/jira/package.json +++ b/recipes/jira/package.json @@ -1,7 +1,7 @@ { "id": "jira", "name": "Jira", - "version": "1.2.3", + "version": "1.3.0", "license": "MIT", "config": { "serviceURL": "https://{teamId}.atlassian.net", diff --git a/recipes/jira/webview.js b/recipes/jira/webview.js index aca65be..f52235d 100644 --- a/recipes/jira/webview.js +++ b/recipes/jira/webview.js @@ -1,14 +1,12 @@ -module.exports = (Franz) => { +module.exports = (Ferdi) => { const getMessages = function getMessages() { // get unread messages const element = document.querySelector('#atlassian-navigation-notification-count span'); let count = element ? element.innerText : 0; count = parseInt(count, 10); - // set Franz badge - Franz.setBadge(count); + Ferdi.setBadge(count); }; - // check for new messages every second and update Franz badge - Franz.loop(getMessages); + Ferdi.loop(getMessages); }; -- cgit v1.2.3-70-g09d2