diff options
author | vantezzen <hello@vantezzen.io> | 2019-09-28 12:10:25 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-09-28 12:10:25 +0200 |
commit | 728d339739b63e9bb59e457e4a84fe9a65b93fc9 (patch) | |
tree | a0fc6180ea26fa9ef397458e8eb6491031d6437d /uncompressed/franz-custom-website | |
parent | Add list of recipes (diff) | |
download | ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.gz ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.tar.zst ferdium-recipes-728d339739b63e9bb59e457e4a84fe9a65b93fc9.zip |
Add uncompressed recipes
Diffstat (limited to 'uncompressed/franz-custom-website')
-rw-r--r-- | uncompressed/franz-custom-website/README.md | 5 | ||||
-rw-r--r-- | uncompressed/franz-custom-website/icon.svg | 11 | ||||
-rw-r--r-- | uncompressed/franz-custom-website/index.js | 20 | ||||
-rw-r--r-- | uncompressed/franz-custom-website/package.json | 15 | ||||
-rw-r--r-- | uncompressed/franz-custom-website/webview.js | 3 |
5 files changed, 54 insertions, 0 deletions
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 @@ | |||
1 | # Custom Websites for Franz | ||
2 | This is the official Franz recipe for adding custom websites to Franz | ||
3 | |||
4 | ### How to create your own Franz recipes: | ||
5 | * [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 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <svg width="80px" height="80px" viewBox="0 0 80 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
3 | <!-- Generator: Sketch 54.1 (76490) - https://sketchapp.com --> | ||
4 | <title>franz-custom-website</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <g id="franz-custom-website" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
7 | <g id="web" fill="#0099E1" fill-rule="nonzero"> | ||
8 | <path d="M57.44,48 C57.76,45.36 58,42.72 58,40 C58,37.28 57.76,34.64 57.44,32 L70.96,32 C71.6,34.56 72,37.24 72,40 C72,42.76 71.6,45.44 70.96,48 L57.44,48 Z M50.36,70.24 C52.76,65.8 54.6,61 55.88,56 L67.68,56 C63.84,62.6 57.72,67.72 50.36,70.24 L50.36,70.24 Z M49.36,48 L30.64,48 C30.24,45.36 30,42.72 30,40 C30,37.28 30.24,34.6 30.64,32 L49.36,32 C49.72,34.6 50,37.28 50,40 C50,42.72 49.72,45.36 49.36,48 L49.36,48 Z M40,71.84 C36.68,67.04 34,61.72 32.36,56 L47.64,56 C46,61.72 43.32,67.04 40,71.84 L40,71.84 Z M24,24 L12.32,24 C16.12,17.36 22.28,12.24 29.6,9.76 C27.2,14.2 25.4,19 24,24 L24,24 Z M12.32,56 L24,56 C25.4,61 27.2,65.8 29.6,70.24 C22.28,67.72 16.12,62.6 12.32,56 L12.32,56 Z M9.04,48 C8.4,45.44 8,42.76 8,40 C8,37.24 8.4,34.56 9.04,32 L22.56,32 C22.24,34.64 22,37.28 22,40 C22,42.72 22.24,45.36 22.56,48 L9.04,48 Z M40,8.12 C43.32,12.92 46,18.28 47.64,24 L32.36,24 C34,18.28 36.68,12.92 40,8.12 L40,8.12 Z M67.68,24 L55.88,24 C54.6,19 52.76,14.2 50.36,9.76 C57.72,12.28 63.84,17.36 67.68,24 L67.68,24 Z M40,0 C17.88,1.77635684e-15 0,18 0,40 C-8.8817842e-16,50.6086596 4.21427361,60.7828161 11.7157288,68.2842712 C19.2171839,75.7857264 29.3913404,80 40,80 C62.09139,80 80,62.09139 80,40 C80,29.3913404 75.7857264,19.2171839 68.2842712,11.7157288 C60.7828161,4.21427361 50.6086596,8.8817842e-16 40,0 Z" id="Shape"></path> | ||
9 | </g> | ||
10 | </g> | ||
11 | </svg> \ 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 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => class CustomWebsite extends Franz { | ||
4 | async validateUrl(url) { | ||
5 | try { | ||
6 | const resp = await window.fetch(url, { | ||
7 | method: 'GET', | ||
8 | headers: { | ||
9 | 'Content-Type': 'application/json' | ||
10 | } | ||
11 | }); | ||
12 | return resp.status.toString().startsWith('2') || resp.status.toString().startsWith('3'); | ||
13 | } catch (err) { | ||
14 | console.error(err); | ||
15 | } | ||
16 | |||
17 | return false; | ||
18 | } | ||
19 | |||
20 | }; \ 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 @@ | |||
1 | { | ||
2 | "id": "franz-custom-website", | ||
3 | "name": "Custom Website", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Add a custom website to Franz", | ||
6 | "main": "index.js", | ||
7 | "author": "Stefan Malzner <stefan@adlk.io>", | ||
8 | "license": "MIT", | ||
9 | "repository": "https://github.com/meetfranz/recipe-custom-website", | ||
10 | "config": { | ||
11 | "hasNotificationSound": false, | ||
12 | "hasIndirectMessages": false, | ||
13 | "hasCustomUrl": true | ||
14 | } | ||
15 | } | ||
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 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = () => {}; \ No newline at end of file | ||