From 2f26373dfecbedc704cf0c7227fc487e0ab7824d Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 28 May 2021 00:12:22 +0200 Subject: [googledrive] Context isolation support --- recipes/googledrive/webview.js | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'recipes/googledrive/webview.js') diff --git a/recipes/googledrive/webview.js b/recipes/googledrive/webview.js index 64a0219..1678825 100644 --- a/recipes/googledrive/webview.js +++ b/recipes/googledrive/webview.js @@ -1,16 +1,7 @@ -module.exports = (Franz, options) => { - window.chrome = { - runtime: { - connect: () => { - return { - onMessage: { - addListener: () => {console.warn('chrome.runtime is not implemented')}, - removeListener: () => {console.warn('chrome.runtime is not implemented')}, - }, - postMessage: () => {console.warn('chrome.runtime is not implemented')}, - disconnect: () => {console.warn('chrome.runtime is not implemented')}, - } - } - } - } -} \ No newline at end of file +"use strict"; + +const path = require('path'); + +module.exports = (Franz) => { + Franz.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js')); +}; -- cgit v1.2.3-70-g09d2