Browse Source

formatted with prettier

DARKDRAGON532 3 years ago
parent
commit
cdb784e387
1 changed files with 11 additions and 9 deletions
  1. 11 9
      Extensions/UserScript/Return Youtube Dislike.user.js

+ 11 - 9
Extensions/UserScript/Return Youtube Dislike.user.js

@@ -121,9 +121,9 @@ function setState() {
   cLog("Fetching votes...");
   cLog("Fetching votes...");
   let statsSet = false;
   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) {
       if (result) {
         cLog("response from youtube:");
         cLog("response from youtube:");
         cLog(JSON.stringify(result));
         cLog(JSON.stringify(result));
@@ -134,19 +134,21 @@ function setState() {
           statsSet = true;
           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) {
       if (json && !statsSet) {
         const { dislikes, likes } = json;
         const { dislikes, likes } = json;
         cLog(`Received count: ${dislikes}`);
         cLog(`Received count: ${dislikes}`);
         setDislikes(numberFormat(dislikes));
         setDislikes(numberFormat(dislikes));
         createRateBar(likes, dislikes);
         createRateBar(likes, dislikes);
       }
       }
-    })
-  })
+    });
+  });
 }
 }
 
 
 function likeClicked() {
 function likeClicked() {