diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-10-05 17:04:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 17:04:09 +0200 |
commit | d3841b766f9d37d557646003899f67525c5f755f (patch) | |
tree | 1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/rocketchat/webview.js | |
parent | chore: repo maintenance (#732) (diff) | |
download | ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip |
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/rocketchat/webview.js')
-rw-r--r-- | recipes/rocketchat/webview.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/recipes/rocketchat/webview.js b/recipes/rocketchat/webview.js index 5ed7866..95ada6f 100644 --- a/recipes/rocketchat/webview.js +++ b/recipes/rocketchat/webview.js | |||
@@ -33,17 +33,17 @@ module.exports = Ferdi => { | |||
33 | 33 | ||
34 | const xmlhttp = new XMLHttpRequest(); | 34 | const xmlhttp = new XMLHttpRequest(); |
35 | 35 | ||
36 | xmlhttp.onreadystatechange = function () { | 36 | xmlhttp.addEventListener('readystatechange', function () { |
37 | if (this.readyState != 4 || this.status != 200) { | 37 | if (this.readyState != 4 || this.status != 200) { |
38 | return; | 38 | return; |
39 | } | 39 | } |
40 | 40 | ||
41 | const response = JSON.parse(this.responseText); | 41 | const response = JSON.parse(this.responseText); |
42 | 42 | ||
43 | if (response.icons.length >= 1) { | 43 | if (response.icons.length > 0) { |
44 | Ferdi.setAvatarImage(`${window.location.protocol}//${window.location.host}${response.icons[0].src}`); | 44 | Ferdi.setAvatarImage(`${window.location.protocol}//${window.location.host}${response.icons[0].src}`); |
45 | } | 45 | } |
46 | }; | 46 | }); |
47 | 47 | ||
48 | xmlhttp.open('GET', manifestUrl, true); | 48 | xmlhttp.open('GET', manifestUrl, true); |
49 | xmlhttp.send(); | 49 | xmlhttp.send(); |