Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Anarios/return-youtube-dislike.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDARKDRAGON532 <69623818+DARKDRAGON532@users.noreply.github.com>2021-11-30 18:46:30 +0300
committerDARKDRAGON532 <69623818+DARKDRAGON532@users.noreply.github.com>2021-11-30 18:46:30 +0300
commitcdb784e387f592bdbf06f5a9c261dc77c5654ef1 (patch)
tree309295527e7281e634a32162636ca5b41b958282
parentae1072ac675ec65beba882a096009c7f9f715712 (diff)
formatted with prettier
-rw-r--r--Extensions/UserScript/Return Youtube Dislike.user.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/Extensions/UserScript/Return Youtube Dislike.user.js b/Extensions/UserScript/Return Youtube Dislike.user.js
index 6a23354..1a2d744 100644
--- a/Extensions/UserScript/Return Youtube Dislike.user.js
+++ b/Extensions/UserScript/Return Youtube Dislike.user.js
@@ -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() {