From 728d339739b63e9bb59e457e4a84fe9a65b93fc9 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Sat, 28 Sep 2019 12:10:25 +0200 Subject: Add uncompressed recipes --- uncompressed/franz-custom-website/README.md | 5 +++++ uncompressed/franz-custom-website/icon.svg | 11 +++++++++++ uncompressed/franz-custom-website/index.js | 20 ++++++++++++++++++++ uncompressed/franz-custom-website/package.json | 15 +++++++++++++++ uncompressed/franz-custom-website/webview.js | 3 +++ 5 files changed, 54 insertions(+) create mode 100644 uncompressed/franz-custom-website/README.md create mode 100644 uncompressed/franz-custom-website/icon.svg create mode 100644 uncompressed/franz-custom-website/index.js create mode 100644 uncompressed/franz-custom-website/package.json create mode 100644 uncompressed/franz-custom-website/webview.js (limited to 'uncompressed/franz-custom-website') diff --git a/uncompressed/franz-custom-website/README.md b/uncompressed/franz-custom-website/README.md new file mode 100644 index 0000000..0b02305 --- /dev/null +++ b/uncompressed/franz-custom-website/README.md @@ -0,0 +1,5 @@ +# Custom Websites for Franz +This is the official Franz recipe for adding custom websites to Franz + +### How to create your own Franz recipes: +* [Read the documentation](https://github.com/meetfranz/plugins) diff --git a/uncompressed/franz-custom-website/icon.svg b/uncompressed/franz-custom-website/icon.svg new file mode 100644 index 0000000..ae9e6d9 --- /dev/null +++ b/uncompressed/franz-custom-website/icon.svg @@ -0,0 +1,11 @@ + + + + franz-custom-website + Created with Sketch. + + + + + + \ No newline at end of file diff --git a/uncompressed/franz-custom-website/index.js b/uncompressed/franz-custom-website/index.js new file mode 100644 index 0000000..47da782 --- /dev/null +++ b/uncompressed/franz-custom-website/index.js @@ -0,0 +1,20 @@ +"use strict"; + +module.exports = Franz => class CustomWebsite extends Franz { + async validateUrl(url) { + try { + const resp = await window.fetch(url, { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + } + }); + return resp.status.toString().startsWith('2') || resp.status.toString().startsWith('3'); + } catch (err) { + console.error(err); + } + + return false; + } + +}; \ No newline at end of file diff --git a/uncompressed/franz-custom-website/package.json b/uncompressed/franz-custom-website/package.json new file mode 100644 index 0000000..bfa43b9 --- /dev/null +++ b/uncompressed/franz-custom-website/package.json @@ -0,0 +1,15 @@ +{ + "id": "franz-custom-website", + "name": "Custom Website", + "version": "1.0.0", + "description": "Add a custom website to Franz", + "main": "index.js", + "author": "Stefan Malzner ", + "license": "MIT", + "repository": "https://github.com/meetfranz/recipe-custom-website", + "config": { + "hasNotificationSound": false, + "hasIndirectMessages": false, + "hasCustomUrl": true + } +} diff --git a/uncompressed/franz-custom-website/webview.js b/uncompressed/franz-custom-website/webview.js new file mode 100644 index 0000000..17661d7 --- /dev/null +++ b/uncompressed/franz-custom-website/webview.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = () => {}; \ No newline at end of file -- cgit v1.2.3-70-g09d2