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/README.md | 5 ----- uncompressed/messenger/icon.png | Bin 196186 -> 0 bytes uncompressed/messenger/icon.svg | 23 ----------------------- uncompressed/messenger/index.js | 11 ----------- uncompressed/messenger/package.json | 13 ------------- uncompressed/messenger/webview.js | 34 ---------------------------------- 6 files changed, 86 deletions(-) delete mode 100644 uncompressed/messenger/README.md delete mode 100644 uncompressed/messenger/icon.png delete mode 100644 uncompressed/messenger/icon.svg delete mode 100644 uncompressed/messenger/index.js delete mode 100644 uncompressed/messenger/package.json delete mode 100644 uncompressed/messenger/webview.js (limited to 'uncompressed/messenger') diff --git a/uncompressed/messenger/README.md b/uncompressed/messenger/README.md deleted file mode 100644 index cbe1f4d..0000000 --- a/uncompressed/messenger/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Messenger for Franz -This is the official Franz recipe for Messenger - -### How to create your own Franz recipes: -* [Read the documentation](https://github.com/meetfranz/plugins) diff --git a/uncompressed/messenger/icon.png b/uncompressed/messenger/icon.png deleted file mode 100644 index 5403253..0000000 Binary files a/uncompressed/messenger/icon.png and /dev/null differ diff --git a/uncompressed/messenger/icon.svg b/uncompressed/messenger/icon.svg deleted file mode 100644 index c861e9a..0000000 --- a/uncompressed/messenger/icon.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - messenger - Created with Sketch. - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uncompressed/messenger/index.js b/uncompressed/messenger/index.js deleted file mode 100644 index f9b8099..0000000 --- a/uncompressed/messenger/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -module.exports = (Franz) => - class Messenger extends Franz { - overrideUserAgent() { - return window.navigator.userAgent.replace( - /(Ferdi|Electron)\/\S+ \([^)]+\)/g, - "" - ); - } - }; diff --git a/uncompressed/messenger/package.json b/uncompressed/messenger/package.json deleted file mode 100644 index b26d37d..0000000 --- a/uncompressed/messenger/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "messenger", - "name": "Messenger", - "version": "1.1.0", - "description": "Facebook Messenger", - "main": "index.js", - "author": "Stefan Malzner ", - "license": "MIT", - "config": { - "serviceURL": "https://messenger.com", - "hasNotificationSound": true - } -} 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