diff options
author | 2020-09-22 20:56:48 +0200 | |
---|---|---|
committer | 2020-09-22 19:56:48 +0100 | |
commit | 6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch) | |
tree | 9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /uncompressed/skype | |
parent | Updated logos for Outlook/OWA (diff) | |
download | ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.gz ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.zst ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.zip |
Unpack recipes and update recipes icons (#292)
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'uncompressed/skype')
-rw-r--r-- | uncompressed/skype/README.md | 5 | ||||
-rw-r--r-- | uncompressed/skype/icon.png | bin | 74473 -> 0 bytes | |||
-rw-r--r-- | uncompressed/skype/icon.svg | 16 | ||||
-rw-r--r-- | uncompressed/skype/index.js | 11 | ||||
-rw-r--r-- | uncompressed/skype/package.json | 13 | ||||
-rw-r--r-- | uncompressed/skype/service.css | 64 | ||||
-rw-r--r-- | uncompressed/skype/webview.js | 107 |
7 files changed, 0 insertions, 216 deletions
diff --git a/uncompressed/skype/README.md b/uncompressed/skype/README.md deleted file mode 100644 index 8a0ae7e..0000000 --- a/uncompressed/skype/README.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # Skype for Franz | ||
2 | This is the official Franz recipe for Skype | ||
3 | |||
4 | ### How to create your own Franz recipes: | ||
5 | * [Read the documentation](https://github.com/meetfranz/plugins) | ||
diff --git a/uncompressed/skype/icon.png b/uncompressed/skype/icon.png deleted file mode 100644 index 38d243b..0000000 --- a/uncompressed/skype/icon.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/uncompressed/skype/icon.svg b/uncompressed/skype/icon.svg deleted file mode 100644 index 228db7a..0000000 --- a/uncompressed/skype/icon.svg +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
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 3.7.2 (28276) - http://www.bohemiancoding.com/sketch --> | ||
4 | <title>skype</title> | ||
5 | <desc>Created with Sketch.</desc> | ||
6 | <defs></defs> | ||
7 | <g id="icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||
8 | <g id="skype" fill="#12A5F4"> | ||
9 | <g id="skype12"> | ||
10 | <g id="Capa_1"> | ||
11 | <path d="M76.5037587,45.6980046 C76.8016705,43.8130858 76.9585151,41.8847332 76.9585151,39.9164733 C76.9585151,19.4589327 60.3753132,2.87610209 39.9172158,2.87610209 C37.9541531,2.87610209 36.020232,3.03777262 34.1369838,3.33234339 C30.7255684,1.22153132 26.6992111,0 22.3842227,0 C10.0224594,0 0.000928074246,10.020232 0.000928074246,22.3832947 C0.000928074246,26.697355 1.22320186,30.7203712 3.33308585,34.1386543 C3.04111369,36.0267285 2.88037123,37.9489559 2.88037123,39.9172158 C2.88037123,60.3762413 19.4632019,76.9540603 39.9164733,76.9540603 C41.8812065,76.9540603 43.8156845,76.8025986 45.6987471,76.5054292 C49.1136891,78.6121578 53.1367053,79.8370302 57.4507657,79.8370302 C69.8158701,79.8370302 79.8362877,69.8141995 79.8362877,57.4515081 C79.8372158,53.1357773 78.6156845,49.1136891 76.5037587,45.6980046 L76.5037587,45.6980046 Z M57.5036659,56.762877 C55.9367053,59.0186543 53.6348956,60.7814385 50.6271926,62.0490023 C47.6133643,63.3199072 44.0512297,63.952297 39.9376334,63.952297 C35.0073318,63.952297 30.92529,63.0895592 27.7032019,61.3473782 C25.4192111,60.0998608 23.5615777,58.4263573 22.1334571,56.3394896 C20.7023666,54.2509513 19.9767981,52.2056613 19.9767981,50.2114153 C19.9767981,49.0349884 20.4254292,48.0118794 21.2987471,47.1777262 C22.1811601,46.3374478 23.3176798,45.9162877 24.6591183,45.9162877 C25.7579582,45.9162877 26.7018097,46.247239 27.4702552,46.9030162 C28.2329466,47.5586079 28.872761,48.5117401 29.3960093,49.7694664 C30.0232019,51.2265429 30.7044084,52.4445476 31.4292343,53.4164269 C32.1496056,54.3762413 33.1634339,55.1775406 34.4764733,55.8047332 C35.7750348,56.4335963 37.5032947,56.7480278 39.6658933,56.7480278 C42.625522,56.7480278 45.017355,56.1078422 46.8478886,54.8449188 C48.687703,53.5704872 49.5714153,52.0198608 49.5714153,50.1462645 C49.5714153,48.6518794 49.094942,47.465058 48.1178654,46.539768 C47.1318794,45.602413 45.8585615,44.8885383 44.2784223,44.3905336 C42.6921578,43.8873318 40.562413,43.3536891 37.8934571,42.7914617 C34.3096056,42.0092807 31.312297,41.0988399 28.8850116,40.0532715 C26.4545708,39.0038051 24.5189791,37.5691879 23.0843619,35.7570302 C21.6467749,33.9270534 20.9299304,31.652529 20.9299304,28.9585151 C20.9299304,26.3896056 21.6866821,24.0922506 23.2016705,22.0928074 C24.7159165,20.0877958 26.9067285,18.5531323 29.7633411,17.4841763 C32.6099304,16.4155916 35.9612065,15.8810209 39.800464,15.8810209 C42.8707193,15.8810209 45.5264965,16.2362877 47.774478,16.943109 C50.0163341,17.6551276 51.8851044,18.59471 53.3793039,19.7737355 C54.8640371,20.9501624 55.9565661,22.1909977 56.6485383,23.4930858 C57.3399536,24.7990719 57.6881671,26.0746172 57.6881671,27.3193503 C57.6881671,28.4766589 57.239536,29.5263109 56.36529,30.4462181 C55.4912297,31.3674246 54.3730858,31.8370302 53.0672854,31.832761 C51.890116,31.832761 50.9666821,31.5612065 50.3263109,30.9863573 C49.702645,30.4302552 49.0476102,29.5448724 48.3391183,28.3109049 C47.4435267,26.5891415 46.3708585,25.247703 45.1235267,24.2882599 C43.9090487,23.3466357 41.9053364,22.8564269 39.1172158,22.8623666 C36.5375406,22.8623666 34.4735035,23.3895128 32.9156381,24.4204176 C31.3481206,25.4678422 30.5987935,26.6830626 30.5952668,28.1069142 C30.5978654,28.9991647 30.8543852,29.7514617 31.37058,30.3948028 C31.8947564,31.0440835 32.6240371,31.6066821 33.5613921,32.0809281 C34.4991183,32.5625986 35.452993,32.9351276 36.4115081,33.2031555 C37.3813457,33.478051 38.9904408,33.8754524 41.2270998,34.4016705 C44.0321114,35.0062181 46.5763341,35.6816705 48.8625522,36.417819 C51.1443155,37.1576798 53.0916009,38.0499304 54.7003248,39.1129466 C56.3218561,40.1728074 57.5892343,41.5240835 58.4939211,43.1561949 C59.4051044,44.7909049 59.8589327,46.7875638 59.8589327,49.1370766 C59.8624594,51.9662181 59.0743387,54.5106265 57.5036659,56.762877 L57.5036659,56.762877 Z" id="Skype"></path> | ||
12 | </g> | ||
13 | </g> | ||
14 | </g> | ||
15 | </g> | ||
16 | </svg> \ No newline at end of file | ||
diff --git a/uncompressed/skype/index.js b/uncompressed/skype/index.js deleted file mode 100644 index f9b8099..0000000 --- a/uncompressed/skype/index.js +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = (Franz) => | ||
4 | class Messenger extends Franz { | ||
5 | overrideUserAgent() { | ||
6 | return window.navigator.userAgent.replace( | ||
7 | /(Ferdi|Electron)\/\S+ \([^)]+\)/g, | ||
8 | "" | ||
9 | ); | ||
10 | } | ||
11 | }; | ||
diff --git a/uncompressed/skype/package.json b/uncompressed/skype/package.json deleted file mode 100644 index 9b4e168..0000000 --- a/uncompressed/skype/package.json +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | { | ||
2 | "id": "skype", | ||
3 | "name": "Skype", | ||
4 | "version": "1.4.1", | ||
5 | "description": "Skype", | ||
6 | "main": "index.js", | ||
7 | "author": "Stefan Malzner <stefan@adlk.io>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://web.skype.com/", | ||
11 | "hasNotificationSound": true | ||
12 | } | ||
13 | } | ||
diff --git a/uncompressed/skype/service.css b/uncompressed/skype/service.css deleted file mode 100644 index 543076f..0000000 --- a/uncompressed/skype/service.css +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | #footer { | ||
2 | display: none; | ||
3 | } | ||
4 | .desktop-capturer-selection { | ||
5 | position: fixed; | ||
6 | top: 0; | ||
7 | left: 0; | ||
8 | width: 100%; | ||
9 | height: 100vh; | ||
10 | background: rgba(30,30,30,.75); | ||
11 | color: #fff; | ||
12 | z-index: 10000000; | ||
13 | display: flex; | ||
14 | align-items: center; | ||
15 | justify-content: center; | ||
16 | } | ||
17 | .desktop-capturer-selection__scroller { | ||
18 | width: 100%; | ||
19 | max-height: 100vh; | ||
20 | overflow-y: auto; | ||
21 | } | ||
22 | .desktop-capturer-selection__list { | ||
23 | max-width: calc(100% - 100px); | ||
24 | margin: 50px; | ||
25 | padding: 0; | ||
26 | display: flex; | ||
27 | flex-wrap: wrap; | ||
28 | list-style: none; | ||
29 | overflow: hidden; | ||
30 | justify-content: center; | ||
31 | } | ||
32 | .desktop-capturer-selection__item { | ||
33 | display: flex; | ||
34 | margin: 4px; | ||
35 | } | ||
36 | .desktop-capturer-selection__btn { | ||
37 | display: flex; | ||
38 | flex-direction: column; | ||
39 | align-items: stretch; | ||
40 | width: 145px; | ||
41 | margin: 0; | ||
42 | border: 0; | ||
43 | border-radius: 3px; | ||
44 | padding: 4px; | ||
45 | color: #fff; | ||
46 | background: #252626; | ||
47 | text-align: left; | ||
48 | transition: background-color .15s, box-shadow .15s; | ||
49 | } | ||
50 | .desktop-capturer-selection__btn:hover, | ||
51 | .desktop-capturer-selection__btn:focus { | ||
52 | background: rgba(98,100,167,.8); | ||
53 | } | ||
54 | .desktop-capturer-selection__thumbnail { | ||
55 | width: 100%; | ||
56 | height: 81px; | ||
57 | object-fit: cover; | ||
58 | } | ||
59 | .desktop-capturer-selection__name { | ||
60 | margin: 6px 0 6px; | ||
61 | white-space: nowrap; | ||
62 | text-overflow: ellipsis; | ||
63 | overflow: hidden; | ||
64 | } \ No newline at end of file | ||
diff --git a/uncompressed/skype/webview.js b/uncompressed/skype/webview.js deleted file mode 100644 index 93a3613..0000000 --- a/uncompressed/skype/webview.js +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | const { desktopCapturer, remote: { BrowserWindow } } = require("electron"); | ||
4 | const path = require('path'); | ||
5 | |||
6 | window.navigator.mediaDevices.getDisplayMedia = () => { | ||
7 | return new Promise(async (resolve, reject) => { | ||
8 | try { | ||
9 | const sources = await desktopCapturer.getSources({ types: ['screen', 'window'] }); | ||
10 | |||
11 | const selectionElem = document.createElement('div'); | ||
12 | selectionElem.classList = 'desktop-capturer-selection'; | ||
13 | selectionElem.innerHTML = ` | ||
14 | <div class="desktop-capturer-selection__scroller"> | ||
15 | <ul class="desktop-capturer-selection__list"> | ||
16 | ${sources.map(({ id, name, thumbnail, display_id, appIcon }) => ` | ||
17 | <li class="desktop-capturer-selection__item"> | ||
18 | <button class="desktop-capturer-selection__btn" data-id="${id}" title="${name}"> | ||
19 | <img class="desktop-capturer-selection__thumbnail" src="${thumbnail.toDataURL()}" /> | ||
20 | <span class="desktop-capturer-selection__name">${name}</span> | ||
21 | </button> | ||
22 | </li> | ||
23 | `).join('')} | ||
24 | </ul> | ||
25 | </div> | ||
26 | `; | ||
27 | document.body.appendChild(selectionElem); | ||
28 | |||
29 | document.querySelectorAll('.desktop-capturer-selection__btn') | ||
30 | .forEach(button => { | ||
31 | button.addEventListener('click', async () => { | ||
32 | try { | ||
33 | const id = button.getAttribute('data-id'); | ||
34 | const source = sources.find(source => source.id === id); | ||
35 | if (!source) { | ||
36 | throw new Error(`Source with id ${id} does not exist`); | ||
37 | } | ||
38 | |||
39 | const stream = await window.navigator.mediaDevices.getUserMedia({ | ||
40 | audio: false, | ||
41 | video: { | ||
42 | mandatory: { | ||
43 | chromeMediaSource: 'desktop', | ||
44 | chromeMediaSourceId: source.id | ||
45 | } | ||
46 | } | ||
47 | }); | ||
48 | resolve(stream); | ||
49 | |||
50 | selectionElem.remove(); | ||
51 | } catch (err) { | ||
52 | reject(err); | ||
53 | } | ||
54 | }); | ||
55 | }); | ||
56 | } catch (err) { | ||
57 | reject(err); | ||
58 | } | ||
59 | }) | ||
60 | } | ||
61 | |||
62 | module.exports = (Franz, settings) => { | ||
63 | const getMessages = function getMessages() { | ||
64 | let count = 0; | ||
65 | const container = document.querySelector('[role="tablist"] > [title="Chats"] > div'); | ||
66 | |||
67 | if (container) { | ||
68 | const children = container.children; | ||
69 | |||
70 | if (children.length === 3) { | ||
71 | const elementContainer = children[children.length - 1]; | ||
72 | |||
73 | if (elementContainer) { | ||
74 | const element = elementContainer.querySelector('[data-text-as-pseudo-element]'); | ||
75 | count = parseInt(element.dataset.textAsPseudoElement, 10); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | |||
80 | Franz.setBadge(count); | ||
81 | }; | ||
82 | |||
83 | Franz.injectCSS(path.join(__dirname, 'service.css')); | ||
84 | Franz.loop(getMessages); | ||
85 | document.addEventListener('click', event => { | ||
86 | const link = event.target.closest('a[href^="http"]'); | ||
87 | const button = event.target.closest('button[title^="http"]'); | ||
88 | |||
89 | if (link || button) { | ||
90 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); | ||
91 | |||
92 | if (url.includes('views/imgpsh_fullsize_anim')) { | ||
93 | event.preventDefault(); | ||
94 | event.stopPropagation(); | ||
95 | let win = new BrowserWindow({ | ||
96 | width: 800, | ||
97 | height: window.innerHeight, | ||
98 | minWidth: 600, | ||
99 | webPreferences: { | ||
100 | partition: `persist:service-${settings.id}` | ||
101 | } | ||
102 | }); | ||
103 | win.loadURL(url); | ||
104 | } | ||
105 | } | ||
106 | }, true); | ||
107 | }; | ||