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 --- recipes/hangoutschat/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recipes/hangoutschat/index.js (limited to 'recipes/hangoutschat/index.js') diff --git a/recipes/hangoutschat/index.js b/recipes/hangoutschat/index.js new file mode 100644 index 0000000..819e06b --- /dev/null +++ b/recipes/hangoutschat/index.js @@ -0,0 +1,22 @@ +var os = require('os') + +// just pass through Franz +module.exports = Franz => + class HangoutsChat extends Franz { + // Method to add headers to requests from Hangouts Chat's webview + modifyRequestHeaders() { + return [{ + headers: { 'origin': 'https://chat.google.com' }, + requestFilters: { + urls: ['*://*/*'] + } + }] + } + + overrideUserAgent() { + if (os.platform() == 'linux') + return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" + else + return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; + } + }; -- cgit v1.2.3-70-g09d2