From e4766969beaa2efb605df0a6da72e96722e9c73c Mon Sep 17 00:00:00 2001 From: aj Date: Fri, 21 Feb 2020 12:44:04 -0500 Subject: adding google meet recipe --- uncompressed/Google Meet/README.md | 12 ++++++++ uncompressed/Google Meet/icon.png | Bin 0 -> 94137 bytes uncompressed/Google Meet/icon.svg | 53 ++++++++++++++++++++++++++++++++++ uncompressed/Google Meet/index.js | 8 +++++ uncompressed/Google Meet/package.json | 13 +++++++++ uncompressed/Google Meet/service.css | 5 ++++ uncompressed/Google Meet/webview.js | 43 +++++++++++++++++++++++++++ 7 files changed, 134 insertions(+) create mode 100644 uncompressed/Google Meet/README.md create mode 100644 uncompressed/Google Meet/icon.png create mode 100644 uncompressed/Google Meet/icon.svg create mode 100644 uncompressed/Google Meet/index.js create mode 100644 uncompressed/Google Meet/package.json create mode 100644 uncompressed/Google Meet/service.css create mode 100644 uncompressed/Google Meet/webview.js (limited to 'uncompressed') diff --git a/uncompressed/Google Meet/README.md b/uncompressed/Google Meet/README.md new file mode 100644 index 0000000..150d988 --- /dev/null +++ b/uncompressed/Google Meet/README.md @@ -0,0 +1,12 @@ +# information +Google Meet Recipe for @getferdi 🥳 Download Ferdi at https://getferdi.com/ + +# how to import these recipes to your ferdi +1. Clone this repo to your computer +2. Rename this repo to a simple name like "gmeet" +3. Copy your renamed folder to the following locations (if there are not available you must create it) +* Mac: ~/Library/Application Support/Ferdi/recipes/dev/ +* Windows: %appdata%/Ferdi/recipes/dev/ +* Linux: ~/.config/Ferdi/recipes/dev +4. Reload Ferdi +5. Navigate to your "add service" section in Ferdi and added to yours. diff --git a/uncompressed/Google Meet/icon.png b/uncompressed/Google Meet/icon.png new file mode 100644 index 0000000..12a85fa Binary files /dev/null and b/uncompressed/Google Meet/icon.png differ diff --git a/uncompressed/Google Meet/icon.svg b/uncompressed/Google Meet/icon.svg new file mode 100644 index 0000000..5fc0a19 --- /dev/null +++ b/uncompressed/Google Meet/icon.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uncompressed/Google Meet/index.js b/uncompressed/Google Meet/index.js new file mode 100644 index 0000000..dd10055 --- /dev/null +++ b/uncompressed/Google Meet/index.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = Franz => class Messenger extends Franz { + overrideUserAgent() { + return window.navigator.userAgent.replace(/(Franz|Electron)([^\s]+\s)/g, ''); + } + +}; \ No newline at end of file diff --git a/uncompressed/Google Meet/package.json b/uncompressed/Google Meet/package.json new file mode 100644 index 0000000..a1c67cb --- /dev/null +++ b/uncompressed/Google Meet/package.json @@ -0,0 +1,13 @@ +{ + "id": "Google Meet", + "name": "Google Meet", + "version": "1.0.1", + "description": "Google Meet", + "main": "index.js", + "author": "Patrick Thoelken ", + "license": "MIT", + "config": { + "serviceURL": "https://meet.google.com", + "hasNotificationSound": true + } +} diff --git a/uncompressed/Google Meet/service.css b/uncompressed/Google Meet/service.css new file mode 100644 index 0000000..b453fd4 --- /dev/null +++ b/uncompressed/Google Meet/service.css @@ -0,0 +1,5 @@ +.app-wrapper-web .app { + width: 100% !important; + height: 100% !important; + top: 0 !important; +} diff --git a/uncompressed/Google Meet/webview.js b/uncompressed/Google Meet/webview.js new file mode 100644 index 0000000..ee00e66 --- /dev/null +++ b/uncompressed/Google Meet/webview.js @@ -0,0 +1,43 @@ +"use strict"; + +const { + remote +} = require('electron'); + +const path = require('path'); + +const webContents = remote.getCurrentWebContents(); +const { + session +} = webContents; + +window.onload = () => { + const title = document.querySelector('.window-title').innerHTML; + + if (title && title.includes('Google Chrome 36+')) { + window.location.reload(); + } +}; + +module.exports = Franz => { + session.flushStorageData(); + session.clearStorageData({ + storages: ['serviceworkers'] + }); + + const getMessages = function getMessages() { + const elements = document.querySelectorAll('.CxUIE, .unread'); + let count = 0; + + for (let i = 0; i < elements.length; i += 1) { + if (elements[i].querySelectorAll('*[data-icon="muted"]').length === 0) { + count += 1; + } + } + + Franz.setBadge(count); + }; + + Franz.injectCSS(path.join(__dirname, 'service.css')); + Franz.loop(getMessages); +}; \ No newline at end of file -- cgit v1.2.3-54-g00ecf From c33d2493deda85ee1ad20b2ca7f366e0345fe956 Mon Sep 17 00:00:00 2001 From: aj <1295659+n-xlkt@users.noreply.github.com> Date: Fri, 21 Feb 2020 21:24:40 -0500 Subject: Update index.js --- uncompressed/Google Meet/index.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'uncompressed') diff --git a/uncompressed/Google Meet/index.js b/uncompressed/Google Meet/index.js index dd10055..97c6a73 100644 --- a/uncompressed/Google Meet/index.js +++ b/uncompressed/Google Meet/index.js @@ -1,8 +1,6 @@ -"use strict"; - -module.exports = Franz => class Messenger extends Franz { - overrideUserAgent() { - return window.navigator.userAgent.replace(/(Franz|Electron)([^\s]+\s)/g, ''); - } - -}; \ No newline at end of file +module.exports = Franz => + class Gmail extends Franz { + overrideUserAgent() { + return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; + } + }; -- cgit v1.2.3-54-g00ecf From 08075d6250e5817641b894f62a9a85282b31d1f8 Mon Sep 17 00:00:00 2001 From: aj Date: Sun, 23 Feb 2020 15:15:17 -0500 Subject: repackaging --- Google Meet.tar.gz | Bin 94069 -> 108378 bytes all.json | 2 +- uncompressed/Google Meet/package.json | 2 +- uncompressed/Google Meet/webview.js | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) (limited to 'uncompressed') diff --git a/Google Meet.tar.gz b/Google Meet.tar.gz index 01972c5..0b3e4d7 100644 Binary files a/Google Meet.tar.gz and b/Google Meet.tar.gz differ diff --git a/all.json b/all.json index 5b3ba85..c0e05c0 100644 --- a/all.json +++ b/all.json @@ -982,7 +982,7 @@ "author": "Patrick Thoelken ", "featured": false, "id": "Google Meet", - "name": "Google Meet", + "name": "googlemeet", "version": "1.0.1", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/Google Meet/icon.png", diff --git a/uncompressed/Google Meet/package.json b/uncompressed/Google Meet/package.json index a1c67cb..0c3a5fe 100644 --- a/uncompressed/Google Meet/package.json +++ b/uncompressed/Google Meet/package.json @@ -1,6 +1,6 @@ { "id": "Google Meet", - "name": "Google Meet", + "name": "googlemeet", "version": "1.0.1", "description": "Google Meet", "main": "index.js", diff --git a/uncompressed/Google Meet/webview.js b/uncompressed/Google Meet/webview.js index ee00e66..8e91418 100644 --- a/uncompressed/Google Meet/webview.js +++ b/uncompressed/Google Meet/webview.js @@ -40,4 +40,4 @@ module.exports = Franz => { Franz.injectCSS(path.join(__dirname, 'service.css')); Franz.loop(getMessages); -}; \ No newline at end of file +}; -- cgit v1.2.3-54-g00ecf