From 6f5e4a00588aefdda7a5a1cfe70935870e7e234a Mon Sep 17 00:00:00 2001 From: Bennett Date: Tue, 22 Sep 2020 20:56:48 +0200 Subject: Unpack recipes and update recipes icons (#292) Co-authored-by: Amine Mouafik --- uncompressed/messenger/webview.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 uncompressed/messenger/webview.js (limited to 'uncompressed/messenger/webview.js') diff --git a/uncompressed/messenger/webview.js b/uncompressed/messenger/webview.js deleted file mode 100644 index ba7ae31..0000000 --- a/uncompressed/messenger/webview.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -module.exports = Franz => { - const getMessages = function getMessages() { - let count = document.querySelectorAll('._5fx8:not(._569x),._1ht3:not(._569x)').length; - const messageRequestsElement = document.querySelector('._5nxf'); - - if (messageRequestsElement) { - count += parseInt(messageRequestsElement.innerHTML, 10); - } - - Franz.setBadge(count); - }; - - Franz.loop(getMessages); - localStorage.setItem('_cs_desktopNotifsEnabled', JSON.stringify({ - __t: new Date().getTime(), - __v: true - })); - - if (typeof Franz.onNotify === 'function') { - Franz.onNotify(notification => { - if (typeof notification.title !== 'string') { - notification.title = ((notification.title.props || {}).content || [])[0] || 'Messenger'; - } - - if (typeof notification.options.body !== 'string') { - notification.options.body = (((notification.options.body || {}).props || {}).content || [])[0] || ''; - } - - return notification; - }); - } -}; \ No newline at end of file -- cgit v1.2.3-70-g09d2