From effc153fe644eaa3ec3a9aa22a419a837d38dbe7 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <6098974-kittywhiskers@users.noreply.gitlab.com> Date: Thu, 2 Jul 2020 15:04:58 +0530 Subject: Add StackExchange recipe --- uncompressed/stackexchange/.gitattributes | 2 ++ uncompressed/stackexchange/.gitignore | 1 + uncompressed/stackexchange/README.md | 9 +++++++++ uncompressed/stackexchange/icon.png | Bin 0 -> 11229 bytes uncompressed/stackexchange/icon.svg | 1 + uncompressed/stackexchange/index.js | 2 ++ uncompressed/stackexchange/package.json | 12 ++++++++++++ uncompressed/stackexchange/service.css | 1 + uncompressed/stackexchange/webview.js | 15 +++++++++++++++ 9 files changed, 43 insertions(+) create mode 100644 uncompressed/stackexchange/.gitattributes create mode 100644 uncompressed/stackexchange/.gitignore create mode 100644 uncompressed/stackexchange/README.md create mode 100644 uncompressed/stackexchange/icon.png create mode 100644 uncompressed/stackexchange/icon.svg create mode 100644 uncompressed/stackexchange/index.js create mode 100644 uncompressed/stackexchange/package.json create mode 100644 uncompressed/stackexchange/service.css create mode 100644 uncompressed/stackexchange/webview.js (limited to 'uncompressed') diff --git a/uncompressed/stackexchange/.gitattributes b/uncompressed/stackexchange/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/uncompressed/stackexchange/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/uncompressed/stackexchange/.gitignore b/uncompressed/stackexchange/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/uncompressed/stackexchange/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/uncompressed/stackexchange/README.md b/uncompressed/stackexchange/README.md new file mode 100644 index 0000000..8bc614b --- /dev/null +++ b/uncompressed/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/uncompressed/stackexchange/icon.png b/uncompressed/stackexchange/icon.png new file mode 100644 index 0000000..f13b0ea Binary files /dev/null and b/uncompressed/stackexchange/icon.png differ diff --git a/uncompressed/stackexchange/icon.svg b/uncompressed/stackexchange/icon.svg new file mode 100644 index 0000000..7042bc0 --- /dev/null +++ b/uncompressed/stackexchange/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/uncompressed/stackexchange/index.js b/uncompressed/stackexchange/index.js new file mode 100644 index 0000000..907a90f --- /dev/null +++ b/uncompressed/stackexchange/index.js @@ -0,0 +1,2 @@ +module.exports = Ferdi => class stackexchange extends Ferdi { +}; diff --git a/uncompressed/stackexchange/package.json b/uncompressed/stackexchange/package.json new file mode 100644 index 0000000..9d976e5 --- /dev/null +++ b/uncompressed/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/uncompressed/stackexchange/service.css b/uncompressed/stackexchange/service.css new file mode 100644 index 0000000..38dcab0 --- /dev/null +++ b/uncompressed/stackexchange/service.css @@ -0,0 +1 @@ +/* Insert custom styles you want to insert here */ \ No newline at end of file diff --git a/uncompressed/stackexchange/webview.js b/uncompressed/stackexchange/webview.js new file mode 100644 index 0000000..ddd0b40 --- /dev/null +++ b/uncompressed/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