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/withspectrum/LICENSE | 21 +++++++++++++++++++++ recipes/withspectrum/README.md | 1 + recipes/withspectrum/icon.png | Bin 0 -> 574431 bytes recipes/withspectrum/icon.svg | 26 ++++++++++++++++++++++++++ recipes/withspectrum/index.js | 4 ++++ recipes/withspectrum/package.json | 12 ++++++++++++ recipes/withspectrum/webview.js | 14 ++++++++++++++ 7 files changed, 78 insertions(+) create mode 100644 recipes/withspectrum/LICENSE create mode 100644 recipes/withspectrum/README.md create mode 100644 recipes/withspectrum/icon.png create mode 100644 recipes/withspectrum/icon.svg create mode 100644 recipes/withspectrum/index.js create mode 100644 recipes/withspectrum/package.json create mode 100644 recipes/withspectrum/webview.js (limited to 'recipes/withspectrum') diff --git a/recipes/withspectrum/LICENSE b/recipes/withspectrum/LICENSE new file mode 100644 index 0000000..084f7b7 --- /dev/null +++ b/recipes/withspectrum/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Max Stoiber + +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/withspectrum/README.md b/recipes/withspectrum/README.md new file mode 100644 index 0000000..cd24e16 --- /dev/null +++ b/recipes/withspectrum/README.md @@ -0,0 +1 @@ +# franz-spectrum \ No newline at end of file diff --git a/recipes/withspectrum/icon.png b/recipes/withspectrum/icon.png new file mode 100644 index 0000000..b8ef5f1 Binary files /dev/null and b/recipes/withspectrum/icon.png differ diff --git a/recipes/withspectrum/icon.svg b/recipes/withspectrum/icon.svg new file mode 100644 index 0000000..2c54e68 --- /dev/null +++ b/recipes/withspectrum/icon.svg @@ -0,0 +1,26 @@ + +512 +Created using Figma + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/withspectrum/index.js b/recipes/withspectrum/index.js new file mode 100644 index 0000000..b77c7a1 --- /dev/null +++ b/recipes/withspectrum/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = Franz => Franz; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpdGhzcGVjdHJ1bS9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiXSwibWFwcGluZ3MiOiI7O0FBQUFBLE9BQU9DLE9BQVAsR0FBaUJDLFNBQVNBLEtBQTFCIiwiZmlsZSI6IndpdGhzcGVjdHJ1bS9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gRnJhbnogPT4gRnJhbnpcbiJdfQ== \ No newline at end of file diff --git a/recipes/withspectrum/package.json b/recipes/withspectrum/package.json new file mode 100644 index 0000000..bd16504 --- /dev/null +++ b/recipes/withspectrum/package.json @@ -0,0 +1,12 @@ +{ + "id": "withspectrum", + "name": "Spectrum", + "version": "1.0.0", + "description": "A community platform for the future.", + "main": "index.js", + "author": "Max Stoiber", + "license": "MIT", + "config": { + "serviceURL": "https://spectrum.chat" + } +} diff --git a/recipes/withspectrum/webview.js b/recipes/withspectrum/webview.js new file mode 100644 index 0000000..2f71cf6 --- /dev/null +++ b/recipes/withspectrum/webview.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = Franz => { + const getMessages = () => { + const element = document.querySelector('[href="/notifications"] > div'); + const content = window.getComputedStyle(element, ':after').getPropertyValue('content').match(/\d+/); + const notifications = Number(content); + + Franz.setBadge(notifications); + }; + + Franz.loop(getMessages); +}; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpdGhzcGVjdHJ1bS93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsImdldE1lc3NhZ2VzIiwiZWxlbWVudCIsImRvY3VtZW50IiwicXVlcnlTZWxlY3RvciIsImNvbnRlbnQiLCJ3aW5kb3ciLCJnZXRDb21wdXRlZFN0eWxlIiwiZ2V0UHJvcGVydHlWYWx1ZSIsIm1hdGNoIiwibm90aWZpY2F0aW9ucyIsIk51bWJlciIsInNldEJhZGdlIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBUztBQUN4QixRQUFNQyxjQUFjLE1BQU07QUFDeEIsVUFBTUMsVUFBVUMsU0FBU0MsYUFBVCxDQUF1QiwrQkFBdkIsQ0FBaEI7QUFDQSxVQUFNQyxVQUFVQyxPQUNiQyxnQkFEYSxDQUNJTCxPQURKLEVBQ2EsUUFEYixFQUViTSxnQkFGYSxDQUVJLFNBRkosRUFHYkMsS0FIYSxDQUdQLEtBSE8sQ0FBaEI7QUFJQSxVQUFNQyxnQkFBZ0JDLE9BQU9OLE9BQVAsQ0FBdEI7O0FBRUFMLFVBQU1ZLFFBQU4sQ0FBZUYsYUFBZjtBQUNELEdBVEQ7O0FBV0FWLFFBQU1hLElBQU4sQ0F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