diff options
author | 2020-10-02 23:43:34 +0200 | |
---|---|---|
committer | 2020-10-03 12:19:00 +0200 | |
commit | ab94de44b9fbf8da261c98ab95b49cba2050df70 (patch) | |
tree | cd9119e08ad6dd5418700df50c434088e52cb80c | |
parent | Update user agent for OWA and Outlook (#302) (diff) | |
download | ferdium-recipes-ab94de44b9fbf8da261c98ab95b49cba2050df70.tar.gz ferdium-recipes-ab94de44b9fbf8da261c98ab95b49cba2050df70.tar.zst ferdium-recipes-ab94de44b9fbf8da261c98ab95b49cba2050df70.zip |
Spoof Chrome plugins for Skype
Skype for Web requires either Chrome or Edge, but refuses to cooperate
with Chromium. The detection of (non-)Chromium is based on navigator.plugins:
https://github.com/Eloston/ungoogled-chromium/issues/1010#issuecomment-643740388
Since we cannot rebuild Chromium to report a different plugin identity,
we instead patch Plugins.prototype to do the spoofing.
Closes https://github.com/getferdi/ferdi/issues/973
-rw-r--r-- | recipes/skype/package.json | 2 | ||||
-rw-r--r-- | recipes/skype/webview.js | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/recipes/skype/package.json b/recipes/skype/package.json index 93043cc..8d9d5af 100644 --- a/recipes/skype/package.json +++ b/recipes/skype/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "skype", | 2 | "id": "skype", |
3 | "name": "Skype", | 3 | "name": "Skype", |
4 | "version": "2.0.0", | 4 | "version": "2.1.0", |
5 | "description": "Skype", | 5 | "description": "Skype", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |
diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js index 4d5292d..2d2ba41 100644 --- a/recipes/skype/webview.js +++ b/recipes/skype/webview.js | |||
@@ -3,6 +3,15 @@ | |||
3 | const { remote: { BrowserWindow } } = require("electron"); | 3 | const { remote: { BrowserWindow } } = require("electron"); |
4 | const path = require('path'); | 4 | const path = require('path'); |
5 | 5 | ||
6 | const nameDescriptor = Object.getOwnPropertyDescriptor(Plugin.prototype, 'name'); | ||
7 | const getName = nameDescriptor.get; | ||
8 | Object.defineProperty(Plugin.prototype, 'name', { | ||
9 | ...nameDescriptor, | ||
10 | get() { | ||
11 | return getName.call(this).replace('Chromium', 'Chrome'); | ||
12 | } | ||
13 | }); | ||
14 | |||
6 | module.exports = (Franz, settings) => { | 15 | module.exports = (Franz, settings) => { |
7 | const getMessages = function getMessages() { | 16 | const getMessages = function getMessages() { |
8 | let count = 0; | 17 | let count = 0; |