diff options
Diffstat (limited to 'uncompressed/twitter/webview.js')
-rw-r--r-- | uncompressed/twitter/webview.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/uncompressed/twitter/webview.js b/uncompressed/twitter/webview.js deleted file mode 100644 index 81f0ba5..0000000 --- a/uncompressed/twitter/webview.js +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = () => { | ||
5 | var direct = 0; | ||
6 | |||
7 | // "Notifications" and "Messages" - aria-label ending in | ||
8 | // "unread items". Sum the values for direct badge. | ||
9 | const notificationsElement = document.querySelector('[data-testid=AppTabBar_Notifications_Link] div div div'); | ||
10 | if (notificationsElement) { | ||
11 | direct += notificationsElement.innerHTML; | ||
12 | } | ||
13 | const DMElement = document.querySelector('[data-testid=AppTabBar_DirectMessage_Link] div div div'); | ||
14 | if (DMElement) { | ||
15 | direct += DMElement.innerHTML; | ||
16 | } | ||
17 | |||
18 | Franz.setBadge(direct); | ||
19 | }; | ||
20 | |||
21 | Franz.loop(getMessages); | ||
22 | |||
23 | }; \ No newline at end of file | ||