From 446cc2d05ee3a5ca66eabd1e109ba23778d8838c Mon Sep 17 00:00:00 2001 From: Vijay A Date: Mon, 11 Sep 2023 08:26:05 +0530 Subject: Remove references to hipchat --- recipes/hipchat/icon.svg | 1 - recipes/hipchat/index.js | 57 -------------------------------------------- recipes/hipchat/package.json | 14 ----------- recipes/hipchat/webview.js | 21 ---------------- 4 files changed, 93 deletions(-) delete mode 100644 recipes/hipchat/icon.svg delete mode 100644 recipes/hipchat/index.js delete mode 100644 recipes/hipchat/package.json delete mode 100644 recipes/hipchat/webview.js (limited to 'recipes') diff --git a/recipes/hipchat/icon.svg b/recipes/hipchat/icon.svg deleted file mode 100644 index 4ccc019..0000000 --- a/recipes/hipchat/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/recipes/hipchat/index.js b/recipes/hipchat/index.js deleted file mode 100644 index e786bcb..0000000 --- a/recipes/hipchat/index.js +++ /dev/null @@ -1,57 +0,0 @@ -function _asyncToGenerator(fn) { - return function () { - const gen = Reflect.apply(fn, this, arguments); - return new Promise((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 { - // eslint-disable-next-line consistent-return - return Promise.resolve(value).then( - value => { - step('next', value); - }, - error => { - step('throw', error); - }, - ); - } - } - return step('next'); - }); - }; -} - -module.exports = Ferdium => - class HipChat extends Ferdium { - validateUrl(url) { - return _asyncToGenerator(function* () { - try { - const resp = yield window.fetch(`${url}/api/features`, { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - }, - }); - const data = yield resp.json(); - - return Object.hasOwnProperty.call(data, 'features'); - } catch (error) { - console.error(error); - } - - return false; - })(); - } - - buildUrl(url) { - return `${url}/chat`; - } - }; diff --git a/recipes/hipchat/package.json b/recipes/hipchat/package.json deleted file mode 100644 index 0f9f3f0..0000000 --- a/recipes/hipchat/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "hipchat", - "name": "HipChat", - "version": "1.3.0", - "license": "MIT", - "config": { - "serviceURL": "https://{teamId}.hipchat.com/chat", - "hasNotificationSound": true, - "hasIndirectMessages": true, - "hasTeamId": true, - "hasCustomUrl": true, - "urlInputSuffix": ".hipchat.com" - } -} diff --git a/recipes/hipchat/webview.js b/recipes/hipchat/webview.js deleted file mode 100644 index 6871fbb..0000000 --- a/recipes/hipchat/webview.js +++ /dev/null @@ -1,21 +0,0 @@ -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} - -const _path = _interopRequireDefault(require('path')); - -module.exports = Ferdium => { - const getMessages = () => { - const directMessages = document.querySelectorAll('.hc-mention').length; - const allMessages = - document.querySelectorAll('.aui-badge:not(.hc-mention)').length - - directMessages; - - // set Ferdium badge - Ferdium.setBadge(directMessages, allMessages); - }; - - Ferdium.loop(getMessages); - - Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); -}; -- cgit v1.2.3-54-g00ecf