From 6f5e4a00588aefdda7a5a1cfe70935870e7e234a Mon Sep 17 00:00:00 2001 From: Bennett Date: Tue, 22 Sep 2020 20:56:48 +0200 Subject: Unpack recipes and update recipes icons (#292) Co-authored-by: Amine Mouafik --- recipes/stackexchange/.gitattributes | 2 ++ recipes/stackexchange/.gitignore | 1 + recipes/stackexchange/README.md | 9 +++++++++ recipes/stackexchange/icon.png | Bin 0 -> 11229 bytes recipes/stackexchange/icon.svg | 1 + recipes/stackexchange/index.js | 2 ++ recipes/stackexchange/package.json | 12 ++++++++++++ recipes/stackexchange/service.css | 1 + recipes/stackexchange/webview.js | 15 +++++++++++++++ 9 files changed, 43 insertions(+) create mode 100644 recipes/stackexchange/.gitattributes create mode 100644 recipes/stackexchange/.gitignore create mode 100644 recipes/stackexchange/README.md create mode 100644 recipes/stackexchange/icon.png create mode 100644 recipes/stackexchange/icon.svg create mode 100644 recipes/stackexchange/index.js create mode 100644 recipes/stackexchange/package.json create mode 100644 recipes/stackexchange/service.css create mode 100644 recipes/stackexchange/webview.js (limited to 'recipes/stackexchange') diff --git a/recipes/stackexchange/.gitattributes b/recipes/stackexchange/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/recipes/stackexchange/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/recipes/stackexchange/.gitignore b/recipes/stackexchange/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/recipes/stackexchange/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/recipes/stackexchange/README.md b/recipes/stackexchange/README.md new file mode 100644 index 0000000..8bc614b --- /dev/null +++ b/recipes/stackexchange/README.md @@ -0,0 +1,9 @@ +# StackExchange for Ferdi + +An unofficial Ferdi recipe for StackExchange + +## Know Issues + +* No Automatic Login Prompt + +The `serviceURL` is set to `https://stackexchange.com/` instead of `https://meta.stackexchange.com/users/login?returnurl=https%3a%2f%2fstackexchange.com%2fusers%2flogin-or-signup%2fdelegated` as it triggers a "Confirm your new account" dialog for users that aren't a member of the "Meta Stack Exchange" (but are of other websites and are already logged in) and may result in unwanted account creation diff --git a/recipes/stackexchange/icon.png b/recipes/stackexchange/icon.png new file mode 100644 index 0000000..f13b0ea Binary files /dev/null and b/recipes/stackexchange/icon.png differ diff --git a/recipes/stackexchange/icon.svg b/recipes/stackexchange/icon.svg new file mode 100644 index 0000000..7042bc0 --- /dev/null +++ b/recipes/stackexchange/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/stackexchange/index.js b/recipes/stackexchange/index.js new file mode 100644 index 0000000..907a90f --- /dev/null +++ b/recipes/stackexchange/index.js @@ -0,0 +1,2 @@ +module.exports = Ferdi => class stackexchange extends Ferdi { +}; diff --git a/recipes/stackexchange/package.json b/recipes/stackexchange/package.json new file mode 100644 index 0000000..9d976e5 --- /dev/null +++ b/recipes/stackexchange/package.json @@ -0,0 +1,12 @@ +{ + "id": "stackexchange", + "name": "StackExchange", + "version": "1.0.0", + "description": "An unofficial Ferdi recipe for StackExchange", + "main": "index.js", + "author": "Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com>", + "license": "MIT", + "config": { + "serviceURL": "https://stackexchange.com/" + } +} diff --git a/recipes/stackexchange/service.css b/recipes/stackexchange/service.css new file mode 100644 index 0000000..38dcab0 --- /dev/null +++ b/recipes/stackexchange/service.css @@ -0,0 +1 @@ +/* Insert custom styles you want to insert here */ \ No newline at end of file diff --git a/recipes/stackexchange/webview.js b/recipes/stackexchange/webview.js new file mode 100644 index 0000000..ddd0b40 --- /dev/null +++ b/recipes/stackexchange/webview.js @@ -0,0 +1,15 @@ +"use strict"; + +var _path = _interopRequireDefault(require("path")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = Ferdi => { + 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-70-g09d2