From cd082f103b8b401ca23dc89aaa3c15f6f077c889 Mon Sep 17 00:00:00 2001 From: Maitre_Oda Date: Sat, 28 Aug 2021 13:04:04 +0200 Subject: New recipe: google-translate (#642) Co-authored-by: oda-alexandre Co-authored-by: Vijay Raghavan Aravamudhan --- recipes/google-translate/LICENSE | 21 +++++++++++++++ recipes/google-translate/README.md | 2 ++ recipes/google-translate/icon.svg | 49 +++++++++++++++++++++++++++++++++++ recipes/google-translate/index.js | 2 ++ recipes/google-translate/package.json | 9 +++++++ recipes/google-translate/service.css | 1 + recipes/google-translate/webview.js | 14 ++++++++++ 7 files changed, 98 insertions(+) create mode 100644 recipes/google-translate/LICENSE create mode 100644 recipes/google-translate/README.md create mode 100644 recipes/google-translate/icon.svg create mode 100644 recipes/google-translate/index.js create mode 100644 recipes/google-translate/package.json create mode 100644 recipes/google-translate/service.css create mode 100644 recipes/google-translate/webview.js (limited to 'recipes/google-translate') diff --git a/recipes/google-translate/LICENSE b/recipes/google-translate/LICENSE new file mode 100644 index 0000000..516df99 --- /dev/null +++ b/recipes/google-translate/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Tania R. Zúñiga + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/recipes/google-translate/README.md b/recipes/google-translate/README.md new file mode 100644 index 0000000..f673a03 --- /dev/null +++ b/recipes/google-translate/README.md @@ -0,0 +1,2 @@ +# google-translate for Ferdi +This is a Ferdi recipe for google-translate diff --git a/recipes/google-translate/icon.svg b/recipes/google-translate/icon.svg new file mode 100644 index 0000000..f5f1c20 --- /dev/null +++ b/recipes/google-translate/icon.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/google-translate/index.js b/recipes/google-translate/index.js new file mode 100644 index 0000000..f714165 --- /dev/null +++ b/recipes/google-translate/index.js @@ -0,0 +1,2 @@ +module.exports = Ferdi => class GoogleTranslate extends Ferdi { +}; diff --git a/recipes/google-translate/package.json b/recipes/google-translate/package.json new file mode 100644 index 0000000..7e7f272 --- /dev/null +++ b/recipes/google-translate/package.json @@ -0,0 +1,9 @@ +{ + "id": "google-translate", + "name": "Google Translate", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://translate.google.com" + } +} diff --git a/recipes/google-translate/service.css b/recipes/google-translate/service.css new file mode 100644 index 0000000..38dcab0 --- /dev/null +++ b/recipes/google-translate/service.css @@ -0,0 +1 @@ +/* Insert custom styles you want to insert here */ \ No newline at end of file diff --git a/recipes/google-translate/webview.js b/recipes/google-translate/webview.js new file mode 100644 index 0000000..9875d8e --- /dev/null +++ b/recipes/google-translate/webview.js @@ -0,0 +1,14 @@ +var _path = _interopRequireDefault(require('path')); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = Ferdi => { + // TODO: If your google-translate service has unread messages, uncomment these lines to implement the logic for updating the badges + // const getMessages = function getMessages() { + // // TODO: Insert your notification-finding code here + // Ferdi.setBadge(0, 0); + // }; + // Ferdi.loop(getMessages); + + Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); +}; -- cgit v1.2.3-54-g00ecf