aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/skype/webview.js
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-05-28 00:01:45 +0200
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-07-24 00:23:17 +0000
commit47af9e6a6f3f4aa6251a0d16b1f5139c19079901 (patch)
treeb2006e8aab2d74bff91b9c5bbcafc8654aca0f8c /recipes/skype/webview.js
parent[googlecalendar] Context isolation support (diff)
downloadferdium-recipes-47af9e6a6f3f4aa6251a0d16b1f5139c19079901.tar.gz
ferdium-recipes-47af9e6a6f3f4aa6251a0d16b1f5139c19079901.tar.zst
ferdium-recipes-47af9e6a6f3f4aa6251a0d16b1f5139c19079901.zip
[skype] Context isolation support
Diffstat (limited to 'recipes/skype/webview.js')
-rw-r--r--recipes/skype/webview.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js
index 2d2ba41..e135be1 100644
--- a/recipes/skype/webview.js
+++ b/recipes/skype/webview.js
@@ -3,15 +3,6 @@
3const { remote: { BrowserWindow } } = require("electron"); 3const { remote: { BrowserWindow } } = require("electron");
4const path = require('path'); 4const path = require('path');
5 5
6const nameDescriptor = Object.getOwnPropertyDescriptor(Plugin.prototype, 'name');
7const getName = nameDescriptor.get;
8Object.defineProperty(Plugin.prototype, 'name', {
9 ...nameDescriptor,
10 get() {
11 return getName.call(this).replace('Chromium', 'Chrome');
12 }
13});
14
15module.exports = (Franz, settings) => { 6module.exports = (Franz, settings) => {
16 const getMessages = function getMessages() { 7 const getMessages = function getMessages() {
17 let count = 0; 8 let count = 0;
@@ -34,6 +25,7 @@ module.exports = (Franz, settings) => {
34 }; 25 };
35 26
36 Franz.injectCSS(path.join(__dirname, 'service.css')); 27 Franz.injectCSS(path.join(__dirname, 'service.css'));
28 Franz.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js'));
37 Franz.loop(getMessages); 29 Franz.loop(getMessages);
38 document.addEventListener('click', event => { 30 document.addEventListener('click', event => {
39 const link = event.target.closest('a[href^="http"]'); 31 const link = event.target.closest('a[href^="http"]');