From e118745fc2714047d0844061ed963c47edef3bc1 Mon Sep 17 00:00:00 2001 From: hayk Date: Wed, 22 Jun 2022 21:40:14 -0400 Subject: New recipe 'protondrive' added (#61) Co-authored-by: Vijay A --- recipes/protondrive/icon.svg | 20 ++++++++++++++++++++ recipes/protondrive/index.js | 1 + recipes/protondrive/package.json | 9 +++++++++ recipes/protondrive/webview-unsafe.js | 16 ++++++++++++++++ recipes/protondrive/webview.js | 8 ++++++++ 5 files changed, 54 insertions(+) create mode 100755 recipes/protondrive/icon.svg create mode 100755 recipes/protondrive/index.js create mode 100755 recipes/protondrive/package.json create mode 100755 recipes/protondrive/webview-unsafe.js create mode 100755 recipes/protondrive/webview.js (limited to 'recipes') diff --git a/recipes/protondrive/icon.svg b/recipes/protondrive/icon.svg new file mode 100755 index 0000000..6d34d92 --- /dev/null +++ b/recipes/protondrive/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/protondrive/index.js b/recipes/protondrive/index.js new file mode 100755 index 0000000..dd41f72 --- /dev/null +++ b/recipes/protondrive/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/protondrive/package.json b/recipes/protondrive/package.json new file mode 100755 index 0000000..3399600 --- /dev/null +++ b/recipes/protondrive/package.json @@ -0,0 +1,9 @@ +{ + "id": "protondrive", + "name": "Proton Drive", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://drive.proton.me" + } +} diff --git a/recipes/protondrive/webview-unsafe.js b/recipes/protondrive/webview-unsafe.js new file mode 100755 index 0000000..9198ac5 --- /dev/null +++ b/recipes/protondrive/webview-unsafe.js @@ -0,0 +1,16 @@ +const notImplemented = () => { + console.warn('chrome.runtime is not implemented'); +}; + +window.chrome = { + runtime: { + connect: () => ({ + onMessage: { + addListener: notImplemented, + removeListener: notImplemented, + }, + postMessage: notImplemented, + disconnect: notImplemented, + }), + }, +}; diff --git a/recipes/protondrive/webview.js b/recipes/protondrive/webview.js new file mode 100755 index 0000000..aba811f --- /dev/null +++ b/recipes/protondrive/webview.js @@ -0,0 +1,8 @@ +const _path = _interopRequireDefault(require('path')); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = (Ferdium) => { + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); + Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); +}; -- cgit v1.2.3-70-g09d2