diff options
author | 2020-09-22 20:56:48 +0200 | |
---|---|---|
committer | 2020-09-22 19:56:48 +0100 | |
commit | 6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch) | |
tree | 9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /uncompressed/zulip/index.js | |
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/zulip/index.js')
-rw-r--r-- | uncompressed/zulip/index.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/uncompressed/zulip/index.js b/uncompressed/zulip/index.js deleted file mode 100644 index 136398c..0000000 --- a/uncompressed/zulip/index.js +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } | ||
4 | |||
5 | module.exports = Franz => class Zulip extends Franz { | ||
6 | validateUrl(url) { | ||
7 | return _asyncToGenerator(function* () { | ||
8 | const baseUrl = new window.URL(url); | ||
9 | const apiVersion = 'api/v1'; | ||
10 | try { | ||
11 | const resp = yield window.fetch(`${baseUrl.origin}/${apiVersion}/server_settings`, { | ||
12 | method: 'GET', | ||
13 | headers: { | ||
14 | 'Content-Type': 'application/json' | ||
15 | } | ||
16 | }); | ||
17 | const data = yield resp.json(); | ||
18 | |||
19 | return Object.hasOwnProperty.call(data, 'realm_uri'); | ||
20 | } catch (err) { | ||
21 | console.error(err); | ||
22 | } | ||
23 | |||
24 | return false; | ||
25 | })(); | ||
26 | } | ||
27 | }; | ||
28 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInp1bGlwL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiIsIlp1bGlwIiwidmFsaWRhdGVVcmwiLCJ1cmwiLCJiYXNlVXJsIiwid2luZG93IiwiVVJMIiwiYXBpVmVyc2lvbiIsInJlc3AiLCJmZXRjaCIsIm9yaWdpbiIsIm1ldGhvZCIsImhlYWRlcnMiLCJkYXRhIiwianNvbiIsIk9iamVjdCIsImhhc093blByb3BlcnR5IiwiY2FsbCIsImVyciIsImNvbnNvbGUiLCJlcnJvciJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBQSxPQUFPQyxPQUFQLEdBQWlCQyxTQUFTLE1BQU1DLEtBQU4sU0FBb0JELEtBQXBCLENBQTBCO0FBQzFDRSxlQUFOLENBQWtCQyxHQUFsQixFQUF1QjtBQUFBO0FBQ25CLGtCQUFNQyxVQUFVLElBQUlDLE9BQU9DLEdBQVgsQ0FBZUgsR0FBZixDQUFoQjtBQUNBLGtCQUFNSSxhQUFhLFFBQW5CO0FBQ0EsZ0JBQUk7QUFDQSxzQkFBTUMsT0FBTyxNQUFNSCxPQUFPSSxLQUFQLENBQWMsR0FBRUwsUUFBUU0sTUFBTyxJQUFHSCxVQUFXLGtCQUE3QyxFQUFnRTtBQUMvRUksNEJBQVEsS0FEdUU7QUFFL0VDLDZCQUFTO0FBQ0wsd0NBQWdCO0FBRFg7QUFGc0UsaUJBQWhFLENBQW5CO0FBTUEsc0JBQU1DLE9BQU8sTUFBTUwsS0FBS00sSUFBTCxFQUFuQjs7QUFFQSx1QkFBT0MsT0FBT0MsY0FBUCxDQUFzQkMsSUFBdEIsQ0FBMkJKLElBQTNCLEVBQWlDLFdBQWpDLENBQVA7QUFDSCxhQVZELENBVUUsT0FBT0ssR0FBUCxFQUFZO0FBQ1ZDLHdCQUFRQyxLQUFSLENBQWNGLEdBQWQ7QUFDSDs7QUFFRCxtQkFBTyxLQUFQO0FBakJtQjtBQWtCdEI7QUFuQitDLENBQXBEIiwiZmlsZSI6Inp1bGlwL2luZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBGcmFueiA9PiBjbGFzcyBadWxpcCBleHRlbmRzIEZyYW56IHtcbiAgICBhc3luYyB2YWxpZGF0ZVVybCh1cmwpIHtcbiAgICAgICAgY29uc3QgYmFzZVVybCA9IG5ldyB3aW5kb3cuVVJMKHVybCk7XG4gICAgICAgIGNvbnN0IGFwaVZlcnNpb24gPSAnYXBpL3YxJ1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3QgcmVzcCA9IGF3YWl0IHdpbmRvdy5mZXRjaChgJHtiYXNlVXJsLm9yaWdpbn0vJHthcGlWZXJzaW9ufS9zZXJ2ZXJfc2V0dGluZ3NgLCB7XG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnR0VUJyxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XG4gICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY29uc3QgZGF0YSA9IGF3YWl0IHJlc3AuanNvbigpO1xuXG4gICAgICAgICAgICByZXR1cm4gT2JqZWN0Lmhhc093blByb3BlcnR5LmNhbGwoZGF0YSwgJ3JlYWxtX3VyaScpO1xuICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZXJyKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG59OyJdfQ== \ No newline at end of file | ||