diff options
author | 2020-04-20 16:10:19 -0700 | |
---|---|---|
committer | 2020-04-20 16:10:19 -0700 | |
commit | 2e6ec8da1f1e3e001d3d3136f3c21907507ef167 (patch) | |
tree | fd8c5ae8a8dc71c128a351a63e6a656971c644ac /uncompressed/slack | |
parent | Update Instagram recipe to use official web service (#111) (diff) | |
download | ferdium-recipes-2e6ec8da1f1e3e001d3d3136f3c21907507ef167.tar.gz ferdium-recipes-2e6ec8da1f1e3e001d3d3136f3c21907507ef167.tar.zst ferdium-recipes-2e6ec8da1f1e3e001d3d3136f3c21907507ef167.zip |
Update slack notifications to exclude draft messages
Diffstat (limited to 'uncompressed/slack')
-rw-r--r-- | uncompressed/slack/package.json | 2 | ||||
-rw-r--r-- | uncompressed/slack/webview.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/uncompressed/slack/package.json b/uncompressed/slack/package.json index 61701b3..987ce6a 100644 --- a/uncompressed/slack/package.json +++ b/uncompressed/slack/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "slack", | 2 | "id": "slack", |
3 | "name": "Slack", | 3 | "name": "Slack", |
4 | "version": "1.0.14", | 4 | "version": "1.0.15", |
5 | "description": "Slack", | 5 | "description": "Slack", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |
diff --git a/uncompressed/slack/webview.js b/uncompressed/slack/webview.js index 0d250e5..2b54c71 100644 --- a/uncompressed/slack/webview.js +++ b/uncompressed/slack/webview.js | |||
@@ -41,7 +41,7 @@ const SELECTOR_CHANNELS_UNREAD = '.p-channel_sidebar__channel--unread:not(.p-cha | |||
41 | 41 | ||
42 | module.exports = Franz => { | 42 | module.exports = Franz => { |
43 | const getMessages = () => { | 43 | const getMessages = () => { |
44 | const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]`).length; | 44 | const directMessages = document.querySelectorAll(`${SELECTOR_CHANNELS_UNREAD} .p-channel_sidebar__badge, .p-channel_sidebar__link--unread:not([data-sidebar-link-id="Punreads"]):not([data-sidebar-link-id="Pdrafts"])`).length; |
45 | const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages; | 45 | const allMessages = document.querySelectorAll(SELECTOR_CHANNELS_UNREAD).length - directMessages; |
46 | Franz.setBadge(directMessages, allMessages); | 46 | Franz.setBadge(directMessages, allMessages); |
47 | }; | 47 | }; |
@@ -51,4 +51,4 @@ module.exports = Franz => { | |||
51 | getTeamIcon(); | 51 | getTeamIcon(); |
52 | }, 4000); | 52 | }, 4000); |
53 | Franz.injectCSS(_path.default.join(__dirname, 'service.css')); | 53 | Franz.injectCSS(_path.default.join(__dirname, 'service.css')); |
54 | }; \ No newline at end of file | 54 | }; |