diff options
Diffstat (limited to 'recipes/mastodon')
-rw-r--r-- | recipes/mastodon/index.js | 4 | ||||
-rw-r--r-- | recipes/mastodon/webview.js | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/recipes/mastodon/index.js b/recipes/mastodon/index.js index 1dd93cc..9be0938 100644 --- a/recipes/mastodon/index.js +++ b/recipes/mastodon/index.js | |||
@@ -1,9 +1,9 @@ | |||
1 | module.exports = (Ferdi) => { | 1 | module.exports = Ferdi => { |
2 | class Mastodon extends Ferdi { | 2 | class Mastodon extends Ferdi { |
3 | validateServer(URL) { | 3 | validateServer(URL) { |
4 | const api = `${URL}`; | 4 | const api = `${URL}`; |
5 | return new Promise((resolve, reject) => { | 5 | return new Promise((resolve, reject) => { |
6 | $.get(api, (resp) => { | 6 | $.get(api, () => { |
7 | resolve(); | 7 | resolve(); |
8 | }).fail(reject); | 8 | }).fail(reject); |
9 | }); | 9 | }); |
diff --git a/recipes/mastodon/webview.js b/recipes/mastodon/webview.js index 4b450a1..8fb448f 100644 --- a/recipes/mastodon/webview.js +++ b/recipes/mastodon/webview.js | |||
@@ -1,11 +1,11 @@ | |||
1 | module.exports = (Ferdi) => { | 1 | module.exports = Ferdi => { |
2 | let latestStatement = $('.status time').attr('datetime'); | 2 | let latestStatement = $('.status time').attr('datetime'); |
3 | let latestNotify = $($('.notification__message span').get(0)).text(); | 3 | let latestNotify = $($('.notification__message span').get(0)).text(); |
4 | 4 | ||
5 | $($('div.column div.scrollable').get(0)).on('scroll', (ev) => { | 5 | $($('div.column div.scrollable').get(0)).on('scroll', () => { |
6 | latestStatement = $('.status time').attr('datetime'); | 6 | latestStatement = $('.status time').attr('datetime'); |
7 | }); | 7 | }); |
8 | $($('div.column div.scrollable').get(1)).on('scroll', (ev) => { | 8 | $($('div.column div.scrollable').get(1)).on('scroll', () => { |
9 | latestNotify = $($('.notification__message span').get(0)).text(); | 9 | latestNotify = $($('.notification__message span').get(0)).text(); |
10 | }); | 10 | }); |
11 | 11 | ||
@@ -22,7 +22,7 @@ module.exports = (Ferdi) => { | |||
22 | } | 22 | } |
23 | 23 | ||
24 | Ferdi.setBadge(reply, unread); | 24 | Ferdi.setBadge(reply, unread); |
25 | } | 25 | }; |
26 | 26 | ||
27 | Ferdi.loop(getMessages); | 27 | Ferdi.loop(getMessages); |
28 | }; | 28 | }; |