diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/jira | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/jira')
-rw-r--r-- | recipes/jira/index.js | 19 | ||||
-rw-r--r-- | recipes/jira/webview.js | 6 |
2 files changed, 10 insertions, 15 deletions
diff --git a/recipes/jira/index.js b/recipes/jira/index.js index 0431300..9fd312d 100644 --- a/recipes/jira/index.js +++ b/recipes/jira/index.js | |||
@@ -1,11 +1,8 @@ | |||
1 | "use strict"; | 1 | module.exports = (Franz) => class Jira extends Franz { |
2 | 2 | overrideUserAgent() { | |
3 | module.exports = (Franz) => | 3 | return window.navigator.userAgent.replace( |
4 | class Jira extends Franz { | 4 | /(Ferdi|Electron)\/\S+ \([^)]+\)/g, |
5 | overrideUserAgent() { | 5 | '', |
6 | return window.navigator.userAgent.replace( | 6 | ); |
7 | /(Ferdi|Electron)\/\S+ \([^)]+\)/g, | 7 | } |
8 | "" | 8 | }; |
9 | ); | ||
10 | } | ||
11 | }; | ||
diff --git a/recipes/jira/webview.js b/recipes/jira/webview.js index 42d32e8..aca65be 100644 --- a/recipes/jira/webview.js +++ b/recipes/jira/webview.js | |||
@@ -1,9 +1,7 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = (Franz) => { | 1 | module.exports = (Franz) => { |
4 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
5 | // get unread messages | 3 | // get unread messages |
6 | let element = document.querySelector('#atlassian-navigation-notification-count span'); | 4 | const element = document.querySelector('#atlassian-navigation-notification-count span'); |
7 | let count = element ? element.innerText : 0; | 5 | let count = element ? element.innerText : 0; |
8 | count = parseInt(count, 10); | 6 | count = parseInt(count, 10); |
9 | 7 | ||
@@ -13,4 +11,4 @@ module.exports = (Franz) => { | |||
13 | 11 | ||
14 | // check for new messages every second and update Franz badge | 12 | // check for new messages every second and update Franz badge |
15 | Franz.loop(getMessages); | 13 | Franz.loop(getMessages); |
16 | }; \ No newline at end of file | 14 | }; |