From 6a12a29e1224939aa115a14715a4415e14b0b389 Mon Sep 17 00:00:00 2001 From: André Oliveira <37463445+SpecialAro@users.noreply.github.com> Date: Thu, 19 Jan 2023 22:50:09 +0000 Subject: feat: add several recipes (#293) --- recipes/crowdin/icon.svg | 45 ++ recipes/crowdin/index.js | 1 + recipes/crowdin/package.json | 9 + recipes/crowdin/webview.js | 9 + recipes/dev-community/icon.svg | 6 + recipes/dev-community/index.js | 1 + recipes/dev-community/package.json | 9 + recipes/dev-community/webview.js | 9 + recipes/elevate/icon.svg | 13 + recipes/elevate/index.js | 1 + recipes/elevate/package.json | 9 + recipes/elevate/webview.js | 9 + recipes/freshservice/icon.svg | 16 + recipes/freshservice/index.js | 1 + recipes/freshservice/package.json | 9 + recipes/freshservice/webview.js | 9 + recipes/gettr/icon.svg | 1 + recipes/gettr/index.js | 1 + recipes/gettr/package.json | 9 + recipes/gettr/webview.js | 9 + recipes/google-docs/icon.svg | 187 +++++++ recipes/google-docs/index.js | 1 + recipes/google-docs/package.json | 9 + recipes/google-docs/webview.js | 9 + recipes/google-presentation/icon.svg | 208 ++++++++ recipes/google-presentation/index.js | 1 + recipes/google-presentation/package.json | 9 + recipes/google-presentation/webview.js | 9 + recipes/google-spreadsheets/icon.svg | 188 +++++++ recipes/google-spreadsheets/index.js | 1 + recipes/google-spreadsheets/package.json | 9 + recipes/google-spreadsheets/webview.js | 9 + recipes/goto/icon.svg | 24 + recipes/goto/index.js | 1 + recipes/goto/package.json | 9 + recipes/goto/webview.js | 9 + recipes/help-scout/icon.svg | 682 +++++++++++++++++++++++++ recipes/help-scout/index.js | 1 + recipes/help-scout/package.json | 9 + recipes/help-scout/webview.js | 163 ++++++ recipes/iberbox/icon.svg | 1 + recipes/iberbox/index.js | 1 + recipes/iberbox/package.json | 9 + recipes/iberbox/webview.js | 9 + recipes/instagram-direct-messages/icon.svg | 51 ++ recipes/instagram-direct-messages/index.js | 7 + recipes/instagram-direct-messages/package.json | 10 + recipes/instagram-direct-messages/service.css | 13 + recipes/instagram-direct-messages/webview.js | 28 + recipes/keepervault/icon.svg | 15 + recipes/keepervault/index.js | 1 + recipes/keepervault/package.json | 9 + recipes/keepervault/webview.js | 9 + recipes/medium/icon.svg | 8 + recipes/medium/index.js | 1 + recipes/medium/package.json | 9 + recipes/medium/webview.js | 9 + recipes/meta-business-suite/icon.svg | 43 ++ recipes/meta-business-suite/index.js | 1 + recipes/meta-business-suite/package.json | 9 + recipes/meta-business-suite/webview.js | 9 + recipes/outreach/icon.svg | 13 + recipes/outreach/index.js | 1 + recipes/outreach/package.json | 9 + recipes/outreach/webview.js | 9 + recipes/pixelfed/icon.svg | 25 + recipes/pixelfed/index.js | 1 + recipes/pixelfed/package.json | 9 + recipes/pixelfed/webview.js | 9 + recipes/posteo/icon.svg | 170 ++++++ recipes/posteo/index.js | 1 + recipes/posteo/package.json | 13 + recipes/posteo/webview.js | 9 + recipes/smartsheet/icon.svg | 12 + recipes/smartsheet/index.js | 1 + recipes/smartsheet/package.json | 9 + recipes/smartsheet/webview.js | 9 + recipes/whimsical/icon.svg | 18 + recipes/whimsical/index.js | 1 + recipes/whimsical/package.json | 9 + recipes/whimsical/webview.js | 9 + 81 files changed, 2303 insertions(+) create mode 100644 recipes/crowdin/icon.svg create mode 100644 recipes/crowdin/index.js create mode 100644 recipes/crowdin/package.json create mode 100644 recipes/crowdin/webview.js create mode 100644 recipes/dev-community/icon.svg create mode 100644 recipes/dev-community/index.js create mode 100644 recipes/dev-community/package.json create mode 100644 recipes/dev-community/webview.js create mode 100644 recipes/elevate/icon.svg create mode 100644 recipes/elevate/index.js create mode 100644 recipes/elevate/package.json create mode 100644 recipes/elevate/webview.js create mode 100644 recipes/freshservice/icon.svg create mode 100644 recipes/freshservice/index.js create mode 100644 recipes/freshservice/package.json create mode 100644 recipes/freshservice/webview.js create mode 100644 recipes/gettr/icon.svg create mode 100644 recipes/gettr/index.js create mode 100644 recipes/gettr/package.json create mode 100644 recipes/gettr/webview.js create mode 100644 recipes/google-docs/icon.svg create mode 100644 recipes/google-docs/index.js create mode 100644 recipes/google-docs/package.json create mode 100644 recipes/google-docs/webview.js create mode 100644 recipes/google-presentation/icon.svg create mode 100644 recipes/google-presentation/index.js create mode 100644 recipes/google-presentation/package.json create mode 100644 recipes/google-presentation/webview.js create mode 100644 recipes/google-spreadsheets/icon.svg create mode 100644 recipes/google-spreadsheets/index.js create mode 100644 recipes/google-spreadsheets/package.json create mode 100644 recipes/google-spreadsheets/webview.js create mode 100644 recipes/goto/icon.svg create mode 100644 recipes/goto/index.js create mode 100644 recipes/goto/package.json create mode 100644 recipes/goto/webview.js create mode 100644 recipes/help-scout/icon.svg create mode 100644 recipes/help-scout/index.js create mode 100644 recipes/help-scout/package.json create mode 100644 recipes/help-scout/webview.js create mode 100644 recipes/iberbox/icon.svg create mode 100644 recipes/iberbox/index.js create mode 100644 recipes/iberbox/package.json create mode 100644 recipes/iberbox/webview.js create mode 100644 recipes/instagram-direct-messages/icon.svg create mode 100644 recipes/instagram-direct-messages/index.js create mode 100644 recipes/instagram-direct-messages/package.json create mode 100644 recipes/instagram-direct-messages/service.css create mode 100644 recipes/instagram-direct-messages/webview.js create mode 100644 recipes/keepervault/icon.svg create mode 100644 recipes/keepervault/index.js create mode 100644 recipes/keepervault/package.json create mode 100644 recipes/keepervault/webview.js create mode 100644 recipes/medium/icon.svg create mode 100644 recipes/medium/index.js create mode 100644 recipes/medium/package.json create mode 100644 recipes/medium/webview.js create mode 100644 recipes/meta-business-suite/icon.svg create mode 100644 recipes/meta-business-suite/index.js create mode 100644 recipes/meta-business-suite/package.json create mode 100644 recipes/meta-business-suite/webview.js create mode 100644 recipes/outreach/icon.svg create mode 100644 recipes/outreach/index.js create mode 100644 recipes/outreach/package.json create mode 100644 recipes/outreach/webview.js create mode 100644 recipes/pixelfed/icon.svg create mode 100644 recipes/pixelfed/index.js create mode 100644 recipes/pixelfed/package.json create mode 100644 recipes/pixelfed/webview.js create mode 100644 recipes/posteo/icon.svg create mode 100644 recipes/posteo/index.js create mode 100644 recipes/posteo/package.json create mode 100644 recipes/posteo/webview.js create mode 100644 recipes/smartsheet/icon.svg create mode 100644 recipes/smartsheet/index.js create mode 100644 recipes/smartsheet/package.json create mode 100644 recipes/smartsheet/webview.js create mode 100644 recipes/whimsical/icon.svg create mode 100644 recipes/whimsical/index.js create mode 100644 recipes/whimsical/package.json create mode 100644 recipes/whimsical/webview.js (limited to 'recipes') diff --git a/recipes/crowdin/icon.svg b/recipes/crowdin/icon.svg new file mode 100644 index 0000000..7df7902 --- /dev/null +++ b/recipes/crowdin/icon.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/crowdin/index.js b/recipes/crowdin/index.js new file mode 100644 index 0000000..a2151ca --- /dev/null +++ b/recipes/crowdin/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Crowdin extends Ferdium {}; diff --git a/recipes/crowdin/package.json b/recipes/crowdin/package.json new file mode 100644 index 0000000..c3437d6 --- /dev/null +++ b/recipes/crowdin/package.json @@ -0,0 +1,9 @@ +{ + "id": "crowdin", + "name": "Crowdin", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://crowdin.com/profile" + } +} diff --git a/recipes/crowdin/webview.js b/recipes/crowdin/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/crowdin/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/dev-community/icon.svg b/recipes/dev-community/icon.svg new file mode 100644 index 0000000..d06b864 --- /dev/null +++ b/recipes/dev-community/icon.svg @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/recipes/dev-community/index.js b/recipes/dev-community/index.js new file mode 100644 index 0000000..c0193ee --- /dev/null +++ b/recipes/dev-community/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class DevCommunity extends Ferdium {}; diff --git a/recipes/dev-community/package.json b/recipes/dev-community/package.json new file mode 100644 index 0000000..0dd7e7f --- /dev/null +++ b/recipes/dev-community/package.json @@ -0,0 +1,9 @@ +{ + "id": "dev-community", + "name": "Dev Community", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://dev.to" + } +} diff --git a/recipes/dev-community/webview.js b/recipes/dev-community/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/dev-community/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/elevate/icon.svg b/recipes/elevate/icon.svg new file mode 100644 index 0000000..053944b --- /dev/null +++ b/recipes/elevate/icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/recipes/elevate/index.js b/recipes/elevate/index.js new file mode 100644 index 0000000..cf9a0d7 --- /dev/null +++ b/recipes/elevate/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Elevate extends Ferdium {}; diff --git a/recipes/elevate/package.json b/recipes/elevate/package.json new file mode 100644 index 0000000..25d4eb1 --- /dev/null +++ b/recipes/elevate/package.json @@ -0,0 +1,9 @@ +{ + "id": "elevate", + "name": "Elevate", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://elevate.serverdata.net" + } +} diff --git a/recipes/elevate/webview.js b/recipes/elevate/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/elevate/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/freshservice/icon.svg b/recipes/freshservice/icon.svg new file mode 100644 index 0000000..b6eed43 --- /dev/null +++ b/recipes/freshservice/icon.svg @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/recipes/freshservice/index.js b/recipes/freshservice/index.js new file mode 100644 index 0000000..e7c549b --- /dev/null +++ b/recipes/freshservice/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class FreshService extends Ferdium {}; diff --git a/recipes/freshservice/package.json b/recipes/freshservice/package.json new file mode 100644 index 0000000..8c3da32 --- /dev/null +++ b/recipes/freshservice/package.json @@ -0,0 +1,9 @@ +{ + "id": "freshservice", + "name": "Freshservice", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://freshservice.com" + } +} diff --git a/recipes/freshservice/webview.js b/recipes/freshservice/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/freshservice/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/gettr/icon.svg b/recipes/gettr/icon.svg new file mode 100644 index 0000000..0a9e6e2 --- /dev/null +++ b/recipes/gettr/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/gettr/index.js b/recipes/gettr/index.js new file mode 100644 index 0000000..fe14017 --- /dev/null +++ b/recipes/gettr/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Gettr extends Ferdium {}; diff --git a/recipes/gettr/package.json b/recipes/gettr/package.json new file mode 100644 index 0000000..e222c2f --- /dev/null +++ b/recipes/gettr/package.json @@ -0,0 +1,9 @@ +{ + "id": "gettr", + "name": "Gettr", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://gettr.com" + } +} diff --git a/recipes/gettr/webview.js b/recipes/gettr/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/gettr/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/google-docs/icon.svg b/recipes/google-docs/icon.svg new file mode 100644 index 0000000..c47410f --- /dev/null +++ b/recipes/google-docs/icon.svg @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/google-docs/index.js b/recipes/google-docs/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/google-docs/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/google-docs/package.json b/recipes/google-docs/package.json new file mode 100644 index 0000000..8afbd1a --- /dev/null +++ b/recipes/google-docs/package.json @@ -0,0 +1,9 @@ +{ + "id": "google-docs", + "name": "Google Docs", + "version": "2.2.0", + "license": "MIT", + "config": { + "serviceURL": "https://docs.google.com/document/u/0/" + } +} diff --git a/recipes/google-docs/webview.js b/recipes/google-docs/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/google-docs/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/google-presentation/icon.svg b/recipes/google-presentation/icon.svg new file mode 100644 index 0000000..f180232 --- /dev/null +++ b/recipes/google-presentation/icon.svg @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/google-presentation/index.js b/recipes/google-presentation/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/google-presentation/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/google-presentation/package.json b/recipes/google-presentation/package.json new file mode 100644 index 0000000..6861390 --- /dev/null +++ b/recipes/google-presentation/package.json @@ -0,0 +1,9 @@ +{ + "id": "google-presentation", + "name": "Google Presentation", + "version": "2.2.0", + "license": "MIT", + "config": { + "serviceURL": "https://docs.google.com/presentation/u/0/" + } +} diff --git a/recipes/google-presentation/webview.js b/recipes/google-presentation/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/google-presentation/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/google-spreadsheets/icon.svg b/recipes/google-spreadsheets/icon.svg new file mode 100644 index 0000000..b78c2dc --- /dev/null +++ b/recipes/google-spreadsheets/icon.svg @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/google-spreadsheets/index.js b/recipes/google-spreadsheets/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/google-spreadsheets/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/google-spreadsheets/package.json b/recipes/google-spreadsheets/package.json new file mode 100644 index 0000000..a35438b --- /dev/null +++ b/recipes/google-spreadsheets/package.json @@ -0,0 +1,9 @@ +{ + "id": "google-spreadsheets", + "name": "Google Spreadsheets", + "version": "2.2.0", + "license": "MIT", + "config": { + "serviceURL": "https://docs.google.com/spreadsheets/u/0/" + } +} diff --git a/recipes/google-spreadsheets/webview.js b/recipes/google-spreadsheets/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/google-spreadsheets/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/goto/icon.svg b/recipes/goto/icon.svg new file mode 100644 index 0000000..27221ff --- /dev/null +++ b/recipes/goto/icon.svg @@ -0,0 +1,24 @@ + + + + + + + + + + diff --git a/recipes/goto/index.js b/recipes/goto/index.js new file mode 100644 index 0000000..4f73491 --- /dev/null +++ b/recipes/goto/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class GoTo extends Ferdium {}; diff --git a/recipes/goto/package.json b/recipes/goto/package.json new file mode 100644 index 0000000..b583578 --- /dev/null +++ b/recipes/goto/package.json @@ -0,0 +1,9 @@ +{ + "id": "goto", + "name": "GoTo", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://app.goto.com/" + } +} diff --git a/recipes/goto/webview.js b/recipes/goto/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/goto/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/help-scout/icon.svg b/recipes/help-scout/icon.svg new file mode 100644 index 0000000..8343e51 --- /dev/null +++ b/recipes/help-scout/icon.svg @@ -0,0 +1,682 @@ + + + + + + diff --git a/recipes/help-scout/index.js b/recipes/help-scout/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/help-scout/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/help-scout/package.json b/recipes/help-scout/package.json new file mode 100644 index 0000000..9048edc --- /dev/null +++ b/recipes/help-scout/package.json @@ -0,0 +1,9 @@ +{ + "id": "help-scout", + "name": "Help Scout", + "version": "1.2.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.helpscout.com" + } +} diff --git a/recipes/help-scout/webview.js b/recipes/help-scout/webview.js new file mode 100644 index 0000000..bd84dd7 --- /dev/null +++ b/recipes/help-scout/webview.js @@ -0,0 +1,163 @@ +const _path = _interopRequireDefault(require('path')); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +/** + * Help Scout integration plugin for Ferdium + * + * @summary Integrates Help Scout into the Ferdium application + * @since 1.2.0 + */ + + +/** + * Scripts specific to ticket pages + * + * @since 1.2.0 + */ +let ticketScripts = { + init : function() { + this.processCopy(); + }, + /** + * Handles clicking the copy link + * + * @since 1.2.0 + * @return {void} + */ + processCopy : function() { + $('#copyLink').on('click', function(e) { + e.preventDefault(); + + copyToClipboard(); + + $('.link-copied').fadeIn('fast').css('display', 'block'); + }); + + $('#closeLink').on('click', function(e) { + e.preventDefault(); + + $('.link-copied').fadeOut('fast', function () { + $(this).css('display', 'none'); + }); + }); + } +}; + + +/** + * The core Ferdium message handler + * + * @since 1.0.0 + */ +module.exports = (Ferdium) => { + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); + + /** + * Get messages for the Ferdium loop + * + * @since 1.0.0 + * @return {void} + */ + function getMessages() { + let mine = ''; + let unassigned = ''; + let total = '0'; + + /** + * Since Help Scout loads things asyncronously, + * we have to trigger everything in the loop for + * it to get recognized. + */ + addCopyLink(); + ticketScripts.init(); + + if ($('.dropdown.mailboxes').length > 0 && $('.dropdown.mailboxes a').hasClass('active')) { + // Individual tickets + mine = $('li.mine a .badge').text(); + unassigned = $('li.unassigned a .badge').text(); + } else if (window.location.href === 'https://secure.helpscout.net/dashboard/') { + // Main dashboard + mine = 0; + unassigned = 0; + + $('.card.mailbox .c-list').each(function() { + let m = $(this).find('a:nth-child(2)').find('.count').text(); + let u = $(this).find('a:first-child').find('.count').text(); + + if ($.isNumeric(m)) { + mine += Number.parseInt(m); + } + + if ($.isNumeric(u)) { + unassigned += Number.parseInt(u); + } + }); + + mine = mine.toString(); + unassigned = unassigned.toString(); + } + + if (mine !== '') { + total = mine; + } + + if (unassigned !== '') { + total = total + '/' + unassigned; + } + + Ferdium.setBadge(total); + } + + Ferdium.loop(getMessages); +}; + + +/** + * Add copy link to the conversation toolbar + * + * @since 1.2.0 + * @return {void} + */ +function addCopyLink() { + if ($('.convo-toolbar').length > 0 && $('#copyLink').length === 0) { + $('#actions-dd .more').append('
  • Copy Link
  • '); + $('.c-convo-toolbar').after(''); + } +} + + +/** + * Process copying URLs to clipboard + * + * @since 1.1. + * @return {void} + */ +function copyToClipboard() { + let targetId = '_hiddenURLField'; + let target = document.querySelector(targetId); + + if(!target) { + target = document.createElement('textarea'); + target.style.position = 'absolute'; + target.style.left = '-9999px'; + target.style.top = '0'; + target.id = targetId; + document.body.append(target); + } + + target.textContent = window.location.href; + + let currentFocus = document.activeElement; + + target.focus(); + target.setSelectionRange(0, target.value.length); + + document.execCommand('copy'); + + if(currentFocus && typeof currentFocus.focus === 'function') { + currentFocus.focus(); + } +} diff --git a/recipes/iberbox/icon.svg b/recipes/iberbox/icon.svg new file mode 100644 index 0000000..272ec6c --- /dev/null +++ b/recipes/iberbox/icon.svg @@ -0,0 +1 @@ + diff --git a/recipes/iberbox/index.js b/recipes/iberbox/index.js new file mode 100644 index 0000000..603e6be --- /dev/null +++ b/recipes/iberbox/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class IberBox extends Ferdium {}; diff --git a/recipes/iberbox/package.json b/recipes/iberbox/package.json new file mode 100644 index 0000000..13e43c5 --- /dev/null +++ b/recipes/iberbox/package.json @@ -0,0 +1,9 @@ +{ + "id": "iberbox", + "name": "IberBox", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://iberbox.com/login" + } +} diff --git a/recipes/iberbox/webview.js b/recipes/iberbox/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/iberbox/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/instagram-direct-messages/icon.svg b/recipes/instagram-direct-messages/icon.svg new file mode 100644 index 0000000..fa2ba39 --- /dev/null +++ b/recipes/instagram-direct-messages/icon.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/instagram-direct-messages/index.js b/recipes/instagram-direct-messages/index.js new file mode 100644 index 0000000..bfa1949 --- /dev/null +++ b/recipes/instagram-direct-messages/index.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = Ferdium => class Messenger extends Ferdium { + overrideUserAgent() { + return window.navigator.userAgent.replace(/(Ferdium|Electron)(\S+\s)/g, ''); + } +}; diff --git a/recipes/instagram-direct-messages/package.json b/recipes/instagram-direct-messages/package.json new file mode 100644 index 0000000..674f8b3 --- /dev/null +++ b/recipes/instagram-direct-messages/package.json @@ -0,0 +1,10 @@ +{ + "id": "instagram-direct-messages", + "name": "Instagram Direct Messages", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://www.instagram.com/direct/inbox/", + "hasNotificationSound": true + } +} diff --git a/recipes/instagram-direct-messages/service.css b/recipes/instagram-direct-messages/service.css new file mode 100644 index 0000000..b31cbc8 --- /dev/null +++ b/recipes/instagram-direct-messages/service.css @@ -0,0 +1,13 @@ +#react-root>section>.t30g8.L1C6I, +#react-root>section>div:first-child { + padding-top: 0; +} + +#react-root>section .Hz2_lz6s.Hz2lFlF, +#react-root>section>div:first-child>div:first-child { + display: none; +} + +#react-root>section .i0EQd { + max-width: unset !important; +} diff --git a/recipes/instagram-direct-messages/webview.js b/recipes/instagram-direct-messages/webview.js new file mode 100644 index 0000000..b59b9f2 --- /dev/null +++ b/recipes/instagram-direct-messages/webview.js @@ -0,0 +1,28 @@ +"use strict"; + +const _path = _interopRequireDefault(require('path')); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +setInterval(() => { + document.querySelector("._lz6s.Hz2lF").style.display = "none"; + document.querySelector(".t30g8.L1C6I").style.paddingTop = 0; + document.querySelector(".i0EQd").style.maxWidth = 'unset !important'; +}, 3000); + +module.exports = (Ferdium) => { + const getMessages = () => { + let count = 0; + const elements = document.querySelectorAll('.rBNOH.soMvl'); + if (elements.length > 0) { + count += 1; + } + Ferdium.setBadge(count); + }; + + Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); +}; diff --git a/recipes/keepervault/icon.svg b/recipes/keepervault/icon.svg new file mode 100644 index 0000000..b448727 --- /dev/null +++ b/recipes/keepervault/icon.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/recipes/keepervault/index.js b/recipes/keepervault/index.js new file mode 100644 index 0000000..5545daa --- /dev/null +++ b/recipes/keepervault/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class KeeperVault extends Ferdium {}; diff --git a/recipes/keepervault/package.json b/recipes/keepervault/package.json new file mode 100644 index 0000000..e13d331 --- /dev/null +++ b/recipes/keepervault/package.json @@ -0,0 +1,9 @@ +{ + "id": "keepervault", + "name": "Keeper Vault", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://keepersecurity.eu/vault/#" + } +} diff --git a/recipes/keepervault/webview.js b/recipes/keepervault/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/keepervault/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/medium/icon.svg b/recipes/medium/icon.svg new file mode 100644 index 0000000..46029c7 --- /dev/null +++ b/recipes/medium/icon.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/recipes/medium/index.js b/recipes/medium/index.js new file mode 100644 index 0000000..89a3dd7 --- /dev/null +++ b/recipes/medium/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Medium extends Ferdium {}; diff --git a/recipes/medium/package.json b/recipes/medium/package.json new file mode 100644 index 0000000..54608d1 --- /dev/null +++ b/recipes/medium/package.json @@ -0,0 +1,9 @@ +{ + "id": "medium", + "name": "Medium", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://medium.com" + } +} diff --git a/recipes/medium/webview.js b/recipes/medium/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/medium/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/meta-business-suite/icon.svg b/recipes/meta-business-suite/icon.svg new file mode 100644 index 0000000..c57fd2a --- /dev/null +++ b/recipes/meta-business-suite/icon.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/meta-business-suite/index.js b/recipes/meta-business-suite/index.js new file mode 100644 index 0000000..7e1bea8 --- /dev/null +++ b/recipes/meta-business-suite/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class MetaBusinessSuite extends Ferdium {}; diff --git a/recipes/meta-business-suite/package.json b/recipes/meta-business-suite/package.json new file mode 100644 index 0000000..fac1ae4 --- /dev/null +++ b/recipes/meta-business-suite/package.json @@ -0,0 +1,9 @@ +{ + "id": "meta-business-suite", + "name": "Meta Business Suite", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://business.facebook.com" + } +} diff --git a/recipes/meta-business-suite/webview.js b/recipes/meta-business-suite/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/meta-business-suite/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/outreach/icon.svg b/recipes/outreach/icon.svg new file mode 100644 index 0000000..c3214c5 --- /dev/null +++ b/recipes/outreach/icon.svg @@ -0,0 +1,13 @@ + + + + + + diff --git a/recipes/outreach/index.js b/recipes/outreach/index.js new file mode 100644 index 0000000..f22ca89 --- /dev/null +++ b/recipes/outreach/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Outreach extends Ferdium {}; diff --git a/recipes/outreach/package.json b/recipes/outreach/package.json new file mode 100644 index 0000000..554a127 --- /dev/null +++ b/recipes/outreach/package.json @@ -0,0 +1,9 @@ +{ + "id": "outreach", + "name": "Outreach", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://accounts.outreach.io/users/sign_in" + } +} diff --git a/recipes/outreach/webview.js b/recipes/outreach/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/outreach/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/pixelfed/icon.svg b/recipes/pixelfed/icon.svg new file mode 100644 index 0000000..49b7ebd --- /dev/null +++ b/recipes/pixelfed/icon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/recipes/pixelfed/index.js b/recipes/pixelfed/index.js new file mode 100644 index 0000000..fb2f9bf --- /dev/null +++ b/recipes/pixelfed/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Pixelfed extends Ferdium {}; diff --git a/recipes/pixelfed/package.json b/recipes/pixelfed/package.json new file mode 100644 index 0000000..1c89fea --- /dev/null +++ b/recipes/pixelfed/package.json @@ -0,0 +1,9 @@ +{ + "id": "pixelfed", + "name": "Pixelfed", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://pixelfed.social" + } +} diff --git a/recipes/pixelfed/webview.js b/recipes/pixelfed/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/pixelfed/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/posteo/icon.svg b/recipes/posteo/icon.svg new file mode 100644 index 0000000..f2743e0 --- /dev/null +++ b/recipes/posteo/icon.svg @@ -0,0 +1,170 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/recipes/posteo/index.js b/recipes/posteo/index.js new file mode 100644 index 0000000..cb914e3 --- /dev/null +++ b/recipes/posteo/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Posteo extends Ferdium {}; diff --git a/recipes/posteo/package.json b/recipes/posteo/package.json new file mode 100644 index 0000000..dff4655 --- /dev/null +++ b/recipes/posteo/package.json @@ -0,0 +1,13 @@ +{ + "id": "posteo", + "name": "Posteo", + "version": "1.0.0", + "license": "MIT", + "aliases": [ + "mail", + "e-mail" + ], + "config": { + "serviceURL": "https://posteo.de/" + } +} diff --git a/recipes/posteo/webview.js b/recipes/posteo/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/posteo/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/smartsheet/icon.svg b/recipes/smartsheet/icon.svg new file mode 100644 index 0000000..5f2170b --- /dev/null +++ b/recipes/smartsheet/icon.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/recipes/smartsheet/index.js b/recipes/smartsheet/index.js new file mode 100644 index 0000000..06cc84f --- /dev/null +++ b/recipes/smartsheet/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class SmartSheet extends Ferdium {}; diff --git a/recipes/smartsheet/package.json b/recipes/smartsheet/package.json new file mode 100644 index 0000000..aa19e96 --- /dev/null +++ b/recipes/smartsheet/package.json @@ -0,0 +1,9 @@ +{ + "id": "smartsheet", + "name": "SmartSheet", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://app.smartsheet.com" + } +} diff --git a/recipes/smartsheet/webview.js b/recipes/smartsheet/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/smartsheet/webview.js @@ -0,0 +1,9 @@ +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')); +}; diff --git a/recipes/whimsical/icon.svg b/recipes/whimsical/icon.svg new file mode 100644 index 0000000..89187f1 --- /dev/null +++ b/recipes/whimsical/icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/recipes/whimsical/index.js b/recipes/whimsical/index.js new file mode 100644 index 0000000..8d0db57 --- /dev/null +++ b/recipes/whimsical/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => class Whimsical extends Ferdium {}; diff --git a/recipes/whimsical/package.json b/recipes/whimsical/package.json new file mode 100644 index 0000000..26ac80d --- /dev/null +++ b/recipes/whimsical/package.json @@ -0,0 +1,9 @@ +{ + "id": "whimsical", + "name": "Whimsical", + "version": "1.0.0", + "license": "MIT", + "config": { + "serviceURL": "https://whimsical.com/" + } +} diff --git a/recipes/whimsical/webview.js b/recipes/whimsical/webview.js new file mode 100644 index 0000000..56a20b6 --- /dev/null +++ b/recipes/whimsical/webview.js @@ -0,0 +1,9 @@ +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')); +}; -- cgit v1.2.3-54-g00ecf