formatted with prettier

This commit is contained in:
DARKDRAGON532 committed 2021-11-30 21:16:30 +05:30
1 parent ae1072ac67
commit cdb784e387
1 file changed
+11 -9
@@ -121,9 +121,9 @@ function setState() {
cLog("Fetching votes...");
let statsSet = false;
fetch(`https://www.youtube.com/watch?v=${getVideoId()}`).then(response => {
response.text().then(text => {
let result = getDislikesFromYoutubeResponse(text)
fetch(`https://www.youtube.com/watch?v=${getVideoId()}`).then((response) => {
response.text().then((text) => {
let result = getDislikesFromYoutubeResponse(text);
if (result) {
cLog("response from youtube:");
cLog(JSON.stringify(result));
@@ -134,19 +134,21 @@ function setState() {
statsSet = true;
}
}
})
})
});
});
fetch(`https://return-youtube-dislike-api.azurewebsites.net/votes?videoId=${getVideoId()}`).then(response => {
response.json().then(json => {
fetch(
`https://return-youtube-dislike-api.azurewebsites.net/votes?videoId=${getVideoId()}`
).then((response) => {
response.json().then((json) => {
if (json && !statsSet) {
const { dislikes, likes } = json;
cLog(`Received count: ${dislikes}`);
setDislikes(numberFormat(dislikes));
createRateBar(likes, dislikes);
}
})
})
});
});
}
function likeClicked() {