Procházet zdrojové kódy

Merge branch 'main' into main

Eryk Darnowski před 3 roky
rodič
revize
f34ee8eda3

+ 521 - 457
Extensions/UserScript/Return Youtube Dislike.user.js

@@ -24,500 +24,564 @@
 // ==/UserScript==
 
 const extConfig = {
-// BEGIN USER OPTIONS
-// You may change the following variables to allowed values listed in the corresponding brackets (* means default). Keep the style and keywords intact. 
-  showUpdatePopup: false, // [true, false*] Show a popup tab after extension update (See what's new)
-  disableVoteSubmission: false, // [true, false*] Disable like/dislike submission (Stops counting your likes and dislikes)
-  coloredThumbs: false, // [true, false*] Colorize thumbs (Use custom colors for thumb icons)
-  coloredBar: false, // [true, false*] Colorize ratio bar (Use custom colors for ratio bar)
-  colorTheme: "classic", // [classic*, accessible, neon] Color theme (red/green, blue/yellow, pink/cyan)
-  numberDisplayFormat: "compactShort", // [compactShort*, compactLong, standard] Number format (For non-English locale users, you may be able to improve appearance with a different option. Please file a feature request if your locale is not covered)
-  numberDisplayRoundDown: true, // [true*, false] Round down numbers (Show rounded down numbers)
-  tooltipPercentageMode: "none", // [none*, dash_like, dash_dislike, both, only_like, only_dislike] Mode of showing percentage in like/dislike bar tooltip.
-// END USER OPTIONS
-};
-
-const LIKED_STATE = "LIKED_STATE";
-const DISLIKED_STATE = "DISLIKED_STATE";
-const NEUTRAL_STATE = "NEUTRAL_STATE";
-let previousState = 3; //1=LIKED, 2=DISLIKED, 3=NEUTRAL
-let likesvalue = 0;
-let dislikesvalue = 0;
-
-let isMobile = location.hostname == "m.youtube.com";
-let isShorts = () => location.pathname.startsWith("/shorts");
-let mobileDislikes = 0;
-function cLog(text, subtext = "") {
-  subtext = subtext.trim() === "" ? "" : `(${subtext})`;
-  console.log(`[Return YouTube Dislikes] ${text} ${subtext}`);
-}
-
-function isInViewport(element) {
-  const rect = element.getBoundingClientRect();
-  const height = innerHeight || document.documentElement.clientHeight;
-  const width = innerWidth || document.documentElement.clientWidth;
-  return (
-    rect.top >= 0 &&
-    rect.left >= 0 &&
-    rect.bottom <= height &&
-    rect.right <= width
-  );
-}
-
-function getButtons() {
-  if (isShorts()) {
-    let elements = document.querySelectorAll(
-      isMobile
-        ? "ytm-like-button-renderer"
-        : "#like-button > ytd-like-button-renderer"
-    );
-    for (let element of elements) {
-      if (isInViewport(element)) {
-        return element;
-      }
-    }
-  }
-  if (isMobile) {
-    return document.querySelector(".slim-video-action-bar-actions");
-  }
-  if (document.getElementById("menu-container")?.offsetParent === null) {
-    return document.querySelector("ytd-menu-renderer.ytd-watch-metadata > div");
-  } else {
-    return document
-      .getElementById("menu-container")
-      ?.querySelector("#top-level-buttons-computed");
+  // BEGIN USER OPTIONS
+  // You may change the following variables to allowed values listed in the corresponding brackets (* means default). Keep the style and keywords intact. 
+    showUpdatePopup: false, // [true, false*] Show a popup tab after extension update (See what's new)
+    disableVoteSubmission: false, // [true, false*] Disable like/dislike submission (Stops counting your likes and dislikes)
+    coloredThumbs: false, // [true, false*] Colorize thumbs (Use custom colors for thumb icons)
+    coloredBar: false, // [true, false*] Colorize ratio bar (Use custom colors for ratio bar)
+    colorTheme: "classic", // [classic*, accessible, neon] Color theme (red/green, blue/yellow, pink/cyan)
+    numberDisplayFormat: "compactShort", // [compactShort*, compactLong, standard] Number format (For non-English locale users, you may be able to improve appearance with a different option. Please file a feature request if your locale is not covered)
+    numberDisplayRoundDown: true, // [true*, false] Round down numbers (Show rounded down numbers)
+    tooltipPercentageMode: "none", // [none*, dash_like, dash_dislike, both, only_like, only_dislike] Mode of showing percentage in like/dislike bar tooltip.
+    numberDisplayReformatLikes: false, // [true, false*] Re-format like numbers (Make likes and dislikes format consistent)
+  // END USER OPTIONS
+  };
+  
+  const LIKED_STATE = "LIKED_STATE";
+  const DISLIKED_STATE = "DISLIKED_STATE";
+  const NEUTRAL_STATE = "NEUTRAL_STATE";
+  let previousState = 3; //1=LIKED, 2=DISLIKED, 3=NEUTRAL
+  let likesvalue = 0;
+  let dislikesvalue = 0;
+  
+  let isMobile = location.hostname == "m.youtube.com";
+  let isShorts = () => location.pathname.startsWith("/shorts");
+  let mobileDislikes = 0;
+  function cLog(text, subtext = "") {
+    subtext = subtext.trim() === "" ? "" : `(${subtext})`;
+    console.log(`[Return YouTube Dislikes] ${text} ${subtext}`);
   }
-}
-
-function getLikeButton() {
-  return getButtons().children[0];
-}
-
-function getDislikeButton() {
-  return getButtons().children[1];
-}
-
-function isVideoLiked() {
-  if (isMobile) {
+  
+  function isInViewport(element) {
+    const rect = element.getBoundingClientRect();
+    const height = innerHeight || document.documentElement.clientHeight;
+    const width = innerWidth || document.documentElement.clientWidth;
     return (
-      getLikeButton().querySelector("button").getAttribute("aria-label") ==
-      "true"
+      rect.top >= 0 &&
+      rect.left >= 0 &&
+      rect.bottom <= height &&
+      rect.right <= width
     );
   }
-  return getLikeButton().classList.contains("style-default-active");
-}
-
-function isVideoDisliked() {
-  if (isMobile) {
-    return (
-      getDislikeButton().querySelector("button").getAttribute("aria-label") ==
-      "true"
-    );
+  
+  function getButtons() {
+    if (isShorts()) {
+      let elements = document.querySelectorAll(
+        isMobile
+          ? "ytm-like-button-renderer"
+          : "#like-button > ytd-like-button-renderer"
+      );
+      for (let element of elements) {
+        if (isInViewport(element)) {
+          return element;
+        }
+      }
+    }
+    if (isMobile) {
+      return document.querySelector(".slim-video-action-bar-actions");
+    }
+    if (document.getElementById("menu-container")?.offsetParent === null) {
+      return document.querySelector("ytd-menu-renderer.ytd-watch-metadata > div");
+    } else {
+      return document
+        .getElementById("menu-container")
+        ?.querySelector("#top-level-buttons-computed");
+    }
   }
-  return getDislikeButton().classList.contains("style-default-active");
-}
-
-function isVideoNotLiked() {
-  if (isMobile) {
-    return !isVideoLiked();
+  
+  function getLikeButton() {
+    return getButtons().children[0];
   }
-  return getLikeButton().classList.contains("style-text");
-}
-
-function isVideoNotDisliked() {
-  if (isMobile) {
-    return !isVideoDisliked();
+  
+  function getDislikeButton() {
+    return getButtons().children[1];
   }
-  return getDislikeButton().classList.contains("style-text");
-}
-
-function checkForUserAvatarButton() {
-  if (isMobile) {
-    return;
+  
+  let mutationObserver = new Object();
+  
+  if (isShorts() && mutationObserver.exists !== true) {
+    cLog('initializing mutation observer')
+    mutationObserver.options = {
+      childList: false,
+      attributes: true,
+      subtree: false
+    };
+    mutationObserver.exists = true;
+    mutationObserver.observer = new MutationObserver( function(mutationList, observer) {
+      mutationList.forEach( (mutation) => {
+        if (mutation.type === 'attributes' && 
+          mutation.target.nodeName === 'TP-YT-PAPER-BUTTON' && 
+          mutation.target.id === 'button') {
+          cLog('Short thumb button status changed');
+          if (mutation.target.getAttribute('aria-pressed') === 'true') {
+            mutation.target.style.color =
+              (mutation.target.parentElement.parentElement.id === 'like-button') ? 
+              getColorFromTheme(true) : getColorFromTheme(false);
+          } else {
+            mutation.target.style.color = 'unset';
+          }
+          return;
+        }
+        cLog('unexpected mutation observer event: ' + mutation.target + mutation.type);
+      });
+    });
   }
-  if (document.querySelector("#avatar-btn")) {
-    return true;
-  } else {
-    return false;
+  
+  function isVideoLiked() {
+    if (isMobile) {
+      return (
+        getLikeButton().querySelector("button").getAttribute("aria-label") ==
+        "true"
+      );
+    }
+    return getLikeButton().classList.contains("style-default-active");
   }
-}
-
-function getState() {
-  if (isVideoLiked()) {
-    return LIKED_STATE;
+  
+  function isVideoDisliked() {
+    if (isMobile) {
+      return (
+        getDislikeButton().querySelector("button").getAttribute("aria-label") ==
+        "true"
+      );
+    }
+    return getDislikeButton().classList.contains("style-default-active");
   }
-  if (isVideoDisliked()) {
-    return DISLIKED_STATE;
+  
+  function isVideoNotLiked() {
+    if (isMobile) {
+      return !isVideoLiked();
+    }
+    return getLikeButton().classList.contains("style-text");
   }
-  return NEUTRAL_STATE;
-}
-
-function setLikes(likesCount) {
-  if (isMobile) {
-    getButtons().children[0].querySelector(".button-renderer-text").innerText =
-      likesCount;
-    return;
+  
+  function isVideoNotDisliked() {
+    if (isMobile) {
+      return !isVideoDisliked();
+    }
+    return getDislikeButton().classList.contains("style-text");
   }
-  getButtons().children[0].querySelector("#text").innerText = likesCount;
-}
-
-function setDislikes(dislikesCount) {
-  if (isMobile) {
-    mobileDislikes = dislikesCount;
-    return;
+  
+  function checkForUserAvatarButton() {
+    if (isMobile) {
+      return;
+    }
+    if (document.querySelector("#avatar-btn")) {
+      return true;
+    } else {
+      return false;
+    }
   }
-  getButtons().children[1].querySelector("#text").innerText = dislikesCount;
-}
-
-(typeof GM_addStyle != "undefined"
-  ? GM_addStyle
-  : (styles) => {
-      let styleNode = document.createElement("style");
-      styleNode.type = "text/css";
-      styleNode.innerText = styles;
-      document.head.appendChild(styleNode);
-    })(`
-    #return-youtube-dislike-bar-container {
-      background: var(--yt-spec-icon-disabled);
-      border-radius: 2px;
+  
+  function getState() {
+    if (isVideoLiked()) {
+      return LIKED_STATE;
     }
-
-    #return-youtube-dislike-bar {
-      background: var(--yt-spec-text-primary);
-      border-radius: 2px;
-      transition: all 0.15s ease-in-out;
+    if (isVideoDisliked()) {
+      return DISLIKED_STATE;
     }
-
-    .ryd-tooltip {
-      position: relative;
-      display: block;
-      height: 2px;
-      top: 9px;
+    return NEUTRAL_STATE;
+  }
+  
+  function setLikes(likesCount) {
+    if (isMobile) {
+      getButtons().children[0].querySelector(".button-renderer-text").innerText =
+        likesCount;
+      return;
     }
-
-    .ryd-tooltip-bar-container {
-      width: 100%;
-      height: 2px;
-      position: absolute;
-      padding-top: 6px;
-      padding-bottom: 28px;
-      top: -6px;
+    getButtons().children[0].querySelector("#text").innerText = likesCount;
+  }
+  
+  function setDislikes(dislikesCount) {
+    if (isMobile) {
+      mobileDislikes = dislikesCount;
+      return;
     }
-  `);
-
-function createRateBar(likes, dislikes) {
-  if (isMobile) {
-    return;
+    getButtons().children[1].querySelector("#text").innerText = dislikesCount;
   }
-  let rateBar = document.getElementById("return-youtube-dislike-bar-container");
-
-  const widthPx =
-    getButtons().children[0].clientWidth +
-    getButtons().children[1].clientWidth +
-    8;
-
-  const widthPercent =
-    likes + dislikes > 0 ? (likes / (likes + dislikes)) * 100 : 50;
-
-  var likePercentage = parseFloat(widthPercent.toFixed(1));
-  const dislikePercentage = (100 - likePercentage).toLocaleString();
-  likePercentage = likePercentage.toLocaleString();
-  
-  var tooltipInnerHTML;
-  switch (extConfig.tooltipPercentageMode) {
-    case "dash_like":
-      tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}&nbsp;&nbsp;-&nbsp;&nbsp;${likePercentage}%`
-    break;
-    case "dash_dislike":
-      tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}&nbsp;&nbsp;-&nbsp;&nbsp;${dislikePercentage}%`
-    break;
-    case "both":
-      tooltipInnerHTML = `${likePercentage}%&nbsp;/&nbsp;${dislikePercentage}%`
-      break;
-    case "only_like":
-      tooltipInnerHTML = `${likePercentage}%`
-      break;
-    case "only_dislike":
-      tooltipInnerHTML = `${dislikePercentage}%`
-      break;
-    default:
-      tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}`
+  
+  function getLikeCountFromButton() {
+    if (isShorts()) {
+      //Youtube Shorts don't work with this query. It's not nessecary; we can skip it and still see the results.
+      //It should be possible to fix this function, but it's not critical to showing the dislike count.
+      return 0;
+    }
+    let likesStr = getLikeButton()
+      .querySelector("button")
+      .getAttribute("aria-label")
+      .replace(/\D/g, "");
+    return likesStr.length > 0 ? parseInt(likesStr) : false;
   }
-
-
-  if (!rateBar && !isMobile) {
-    let colorLikeStyle = "";
-    let colorDislikeStyle = "";
-    if (extConfig.coloredBar) {
-      colorLikeStyle = "; background-color: " + getColorFromTheme(true);
-      colorDislikeStyle = "; background-color: " + getColorFromTheme(false);
+  
+  (typeof GM_addStyle != "undefined"
+    ? GM_addStyle
+    : (styles) => {
+        let styleNode = document.createElement("style");
+        styleNode.type = "text/css";
+        styleNode.innerText = styles;
+        document.head.appendChild(styleNode);
+      })(`
+      #return-youtube-dislike-bar-container {
+        background: var(--yt-spec-icon-disabled);
+        border-radius: 2px;
+      }
+  
+      #return-youtube-dislike-bar {
+        background: var(--yt-spec-text-primary);
+        border-radius: 2px;
+        transition: all 0.15s ease-in-out;
+      }
+  
+      .ryd-tooltip {
+        position: relative;
+        display: block;
+        height: 2px;
+        top: 9px;
+      }
+  
+      .ryd-tooltip-bar-container {
+        width: 100%;
+        height: 2px;
+        position: absolute;
+        padding-top: 6px;
+        padding-bottom: 28px;
+        top: -6px;
+      }
+    `);
+  
+  function createRateBar(likes, dislikes) {
+    if (isMobile) {
+      return;
     }
+    let rateBar = document.getElementById("return-youtube-dislike-bar-container");
+  
+    const widthPx =
+      getButtons().children[0].clientWidth +
+      getButtons().children[1].clientWidth +
+      8;
+  
+    const widthPercent =
+      likes + dislikes > 0 ? (likes / (likes + dislikes)) * 100 : 50;
+  
+    var likePercentage = parseFloat(widthPercent.toFixed(1));
+    const dislikePercentage = (100 - likePercentage).toLocaleString();
+    likePercentage = likePercentage.toLocaleString();
     
-    document.getElementById("menu-container").insertAdjacentHTML(
-      "beforeend",
-      `
-        <div class="ryd-tooltip" style="width: ${widthPx}px">
-        <div class="ryd-tooltip-bar-container">
-           <div
-              id="return-youtube-dislike-bar-container"
-              style="width: 100%; height: 2px;${colorDislikeStyle}"
-              >
-              <div
-                 id="return-youtube-dislike-bar"
-                 style="width: ${widthPercent}%; height: 100%${colorDislikeStyle}"
-                 ></div>
-           </div>
-        </div>
-        <tp-yt-paper-tooltip position="top" id="ryd-dislike-tooltip" class="style-scope ytd-sentiment-bar-renderer" role="tooltip" tabindex="-1">
-           <!--css-build:shady-->${tooltipInnerHTML}
-        </tp-yt-paper-tooltip>
-        </div>
-`
-    );
-  } else {
-    document.getElementById(
-      "return-youtube-dislike-bar-container"
-    ).style.width = widthPx + "px";
-    document.getElementById("return-youtube-dislike-bar").style.width =
-      widthPercent + "%";
-
-    document.querySelector(
-      "#ryd-dislike-tooltip > #tooltip"
-    ).innerHTML = tooltipInnerHTML;
-    
-    if (extConfig.coloredBar) {
-      document.getElementById("return-youtube-dislike-bar-container").style.backgroundColor =
-        getColorFromTheme(false);
-      document.getElementById("return-youtube-dislike-bar").style.backgroundColor =
-        getColorFromTheme(true);
+    var tooltipInnerHTML;
+    switch (extConfig.tooltipPercentageMode) {
+      case "dash_like":
+        tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}&nbsp;&nbsp;-&nbsp;&nbsp;${likePercentage}%`
+      break;
+      case "dash_dislike":
+        tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}&nbsp;&nbsp;-&nbsp;&nbsp;${dislikePercentage}%`
+      break;
+      case "both":
+        tooltipInnerHTML = `${likePercentage}%&nbsp;/&nbsp;${dislikePercentage}%`
+        break;
+      case "only_like":
+        tooltipInnerHTML = `${likePercentage}%`
+        break;
+      case "only_dislike":
+        tooltipInnerHTML = `${dislikePercentage}%`
+        break;
+      default:
+        tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}`
+    }
+  
+  
+    if (!rateBar && !isMobile) {
+      let colorLikeStyle = "";
+      let colorDislikeStyle = "";
+      if (extConfig.coloredBar) {
+        colorLikeStyle = "; background-color: " + getColorFromTheme(true);
+        colorDislikeStyle = "; background-color: " + getColorFromTheme(false);
+      }
+      
+      document.getElementById("menu-container").insertAdjacentHTML(
+        "beforeend",
+        `
+          <div class="ryd-tooltip" style="width: ${widthPx}px">
+          <div class="ryd-tooltip-bar-container">
+             <div
+                id="return-youtube-dislike-bar-container"
+                style="width: 100%; height: 2px;${colorDislikeStyle}"
+                >
+                <div
+                   id="return-youtube-dislike-bar"
+                   style="width: ${widthPercent}%; height: 100%${colorDislikeStyle}"
+                   ></div>
+             </div>
+          </div>
+          <tp-yt-paper-tooltip position="top" id="ryd-dislike-tooltip" class="style-scope ytd-sentiment-bar-renderer" role="tooltip" tabindex="-1">
+             <!--css-build:shady-->${tooltipInnerHTML}
+          </tp-yt-paper-tooltip>
+          </div>
+  `
+      );
+    } else {
+      document.getElementById(
+        "return-youtube-dislike-bar-container"
+      ).style.width = widthPx + "px";
+      document.getElementById("return-youtube-dislike-bar").style.width =
+        widthPercent + "%";
+  
+      document.querySelector(
+        "#ryd-dislike-tooltip > #tooltip"
+      ).innerHTML = tooltipInnerHTML;
+      
+      if (extConfig.coloredBar) {
+        document.getElementById("return-youtube-dislike-bar-container").style.backgroundColor =
+          getColorFromTheme(false);
+        document.getElementById("return-youtube-dislike-bar").style.backgroundColor =
+          getColorFromTheme(true);
+      }
     }
   }
-}
-
-function setState() {
-  cLog("Fetching votes...");
-  let statsSet = false;
-
-  fetch(
-    `https://returnyoutubedislikeapi.com/votes?videoId=${getVideoId()}`
-  ).then((response) => {
-    response.json().then((json) => {
-      if (json && !("traceId" in response) && !statsSet) {
-        const { dislikes, likes } = json;
-        cLog(`Received count: ${dislikes}`);
-        likesvalue = likes;
-        dislikesvalue = dislikes;
-        setDislikes(numberFormat(dislikes));
-        createRateBar(likes, dislikes);
-        if (extConfig.coloredThumbs === true) {
-          getLikeButton().style.color = getColorFromTheme(true);
-          getDislikeButton().style.color = getColorFromTheme(false);
+  
+  function setState() {
+    cLog("Fetching votes...");
+    let statsSet = false;
+  
+    fetch(
+      `https://returnyoutubedislikeapi.com/votes?videoId=${getVideoId()}`
+    ).then((response) => {
+      response.json().then((json) => {
+        if (json && !("traceId" in response) && !statsSet) {
+          const { dislikes, likes } = json;
+          cLog(`Received count: ${dislikes}`);
+          likesvalue = likes;
+          dislikesvalue = dislikes;
+          setDislikes(numberFormat(dislikes));
+          if (extConfig.numberDisplayReformatLikes === true) {
+            const nativeLikes = getLikeCountFromButton();
+            if (nativeLikes !== false) {
+              setLikes(numberFormat(nativeLikes));
+            }
+          }
+          createRateBar(likes, dislikes);
+          if (extConfig.coloredThumbs === true) {
+            if (isShorts()) { // for shorts, leave deactived buttons in default color
+              let shortLikeButton = getLikeButton().querySelector('tp-yt-paper-button#button');
+              let shortDislikeButton = getDislikeButton().querySelector('tp-yt-paper-button#button');
+              if (shortLikeButton.getAttribute('aria-pressed') === 'true') {
+                shortLikeButton.style.color = getColorFromTheme(true);
+              }
+              if (shortDislikeButton.getAttribute('aria-pressed') === 'true') {
+                shortDislikeButton.style.color = getColorFromTheme(false);
+              }
+              mutationObserver.observer.observe(shortLikeButton, mutationObserver.options);
+              mutationObserver.observer.observe(shortDislikeButton, mutationObserver.options);
+            } else {
+              getLikeButton().style.color = getColorFromTheme(true);
+              getDislikeButton().style.color = getColorFromTheme(false);
+            }
+          }
         }
-      }
+      });
     });
-  });
-}
-
-function likeClicked() {
-  if (checkForUserAvatarButton() == true) {
-    if (previousState == 1) {
-      likesvalue--;
-      createRateBar(likesvalue, dislikesvalue);
-      setDislikes(numberFormat(dislikesvalue));
-      previousState = 3;
-    } else if (previousState == 2) {
-      likesvalue++;
-      dislikesvalue--;
-      setDislikes(numberFormat(dislikesvalue));
-      createRateBar(likesvalue, dislikesvalue);
-      previousState = 1;
-    } else if (previousState == 3) {
-      likesvalue++;
-      createRateBar(likesvalue, dislikesvalue);
-      previousState = 1;
+  }
+  
+  function likeClicked() {
+    if (checkForUserAvatarButton() == true) {
+      if (previousState == 1) {
+        likesvalue--;
+        createRateBar(likesvalue, dislikesvalue);
+        setDislikes(numberFormat(dislikesvalue));
+        previousState = 3;
+      } else if (previousState == 2) {
+        likesvalue++;
+        dislikesvalue--;
+        setDislikes(numberFormat(dislikesvalue));
+        createRateBar(likesvalue, dislikesvalue);
+        previousState = 1;
+      } else if (previousState == 3) {
+        likesvalue++;
+        createRateBar(likesvalue, dislikesvalue);
+        previousState = 1;
+      }
     }
   }
-}
-
-function dislikeClicked() {
-  if (checkForUserAvatarButton() == true) {
-    if (previousState == 3) {
-      dislikesvalue++;
-      setDislikes(numberFormat(dislikesvalue));
-      createRateBar(likesvalue, dislikesvalue);
-      previousState = 2;
-    } else if (previousState == 2) {
-      dislikesvalue--;
-      setDislikes(numberFormat(dislikesvalue));
-      createRateBar(likesvalue, dislikesvalue);
-      previousState = 3;
-    } else if (previousState == 1) {
-      likesvalue--;
-      dislikesvalue++;
-      setDislikes(numberFormat(dislikesvalue));
-      createRateBar(likesvalue, dislikesvalue);
-      previousState = 2;
+  
+  function dislikeClicked() {
+    if (checkForUserAvatarButton() == true) {
+      if (previousState == 3) {
+        dislikesvalue++;
+        setDislikes(numberFormat(dislikesvalue));
+        createRateBar(likesvalue, dislikesvalue);
+        previousState = 2;
+      } else if (previousState == 2) {
+        dislikesvalue--;
+        setDislikes(numberFormat(dislikesvalue));
+        createRateBar(likesvalue, dislikesvalue);
+        previousState = 3;
+      } else if (previousState == 1) {
+        likesvalue--;
+        dislikesvalue++;
+        setDislikes(numberFormat(dislikesvalue));
+        createRateBar(likesvalue, dislikesvalue);
+        previousState = 2;
+      }
     }
   }
-}
-
-function setInitialState() {
-  setState();
-}
-
-function getVideoId() {
-  const urlObject = new URL(window.location.href);
-  const pathname = urlObject.pathname;
-  if (pathname.startsWith("/clip")) {
-    return document.querySelector("meta[itemprop='videoId']").content;
-  } else {
-    if (pathname.startsWith("/shorts")) {
-      return pathname.slice(8);
+  
+  function setInitialState() {
+    setState();
+  }
+  
+  function getVideoId() {
+    const urlObject = new URL(window.location.href);
+    const pathname = urlObject.pathname;
+    if (pathname.startsWith("/clip")) {
+      return document.querySelector("meta[itemprop='videoId']").content;
+    } else {
+      if (pathname.startsWith("/shorts")) {
+        return pathname.slice(8);
+      }
+      return urlObject.searchParams.get("v");
     }
-    return urlObject.searchParams.get("v");
   }
-}
-
-function isVideoLoaded() {
-  if (isMobile) {
-    return document.getElementById("player").getAttribute("loading") == "false";
+  
+  function isVideoLoaded() {
+    if (isMobile) {
+      return document.getElementById("player").getAttribute("loading") == "false";
+    }
+    const videoId = getVideoId();
+  
+    return (
+      document.querySelector(`ytd-watch-flexy[video-id='${videoId}']`) !== null
+    );
   }
-  const videoId = getVideoId();
-
-  return (
-    document.querySelector(`ytd-watch-flexy[video-id='${videoId}']`) !== null
-  );
-}
-
-function roundDown(num) {
-  if (num < 1000) return num;
-  const int = Math.floor(Math.log10(num) - 2);
-  const decimal = int + (int % 3 ? 1 : 0);
-  const value = Math.floor(num / 10 ** decimal);
-  return value * 10 ** decimal;
-}
-
-function numberFormat(numberState) {
-  let userLocales;
-  try {
-    userLocales = new URL(
-      Array.from(document.querySelectorAll("head > link[rel='search']"))
-        ?.find((n) => n?.getAttribute("href")?.includes("?locale="))
-        ?.getAttribute("href")
-    )?.searchParams?.get("locale");
-  } catch {}
-
-  let numberDisplay;
-  if (extConfig.numberDisplayRoundDown === false) {
-    numberDisplay = numberState;
-  } else {
-    numberDisplay = roundDown(numberState);
+  
+  function roundDown(num) {
+    if (num < 1000) return num;
+    const int = Math.floor(Math.log10(num) - 2);
+    const decimal = int + (int % 3 ? 1 : 0);
+    const value = Math.floor(num / 10 ** decimal);
+    return value * 10 ** decimal;
   }
-  return getNumberFormatter(extConfig.numberDisplayFormat).format(
-    numberDisplay
-  );
-}
-
-function getNumberFormatter(optionSelect) {
-  let formatterNotation;
-  let formatterCompactDisplay;
-
-  switch (optionSelect) {
-    case "compactLong":
-      formatterNotation = "compact";
-      formatterCompactDisplay = "long";
-      break;
-    case "standard":
-      formatterNotation = "standard";
-      formatterCompactDisplay = "short";
-      break;
-    case "compactShort":
-    default:
-      formatterNotation = "compact";
-      formatterCompactDisplay = "short";
+  
+  function numberFormat(numberState) {
+    let userLocales;
+    try {
+      userLocales = new URL(
+        Array.from(document.querySelectorAll("head > link[rel='search']"))
+          ?.find((n) => n?.getAttribute("href")?.includes("?locale="))
+          ?.getAttribute("href")
+      )?.searchParams?.get("locale");
+    } catch {}
+  
+    let numberDisplay;
+    if (extConfig.numberDisplayRoundDown === false) {
+      numberDisplay = numberState;
+    } else {
+      numberDisplay = roundDown(numberState);
+    }
+    return getNumberFormatter(extConfig.numberDisplayFormat).format(
+      numberDisplay
+    );
   }
-
-  const formatter = Intl.NumberFormat(
-    document.documentElement.lang || userLocales || navigator.language,
-    {
-      notation: formatterNotation,
-      compactDisplay: formatterCompactDisplay,
+  
+  function getNumberFormatter(optionSelect) {
+    let formatterNotation;
+    let formatterCompactDisplay;
+  
+    switch (optionSelect) {
+      case "compactLong":
+        formatterNotation = "compact";
+        formatterCompactDisplay = "long";
+        break;
+      case "standard":
+        formatterNotation = "standard";
+        formatterCompactDisplay = "short";
+        break;
+      case "compactShort":
+      default:
+        formatterNotation = "compact";
+        formatterCompactDisplay = "short";
     }
-  );
-  return formatter;
-}
-
-function getColorFromTheme(voteIsLike) {
-  let colorString;
-  switch (extConfig.colorTheme) {
-    case "accessible":
-      if (voteIsLike === true) {
-        colorString = "dodgerblue";
-      } else {
-        colorString = "gold";
-      }
-      break;
-    case "neon":
-      if (voteIsLike === true) {
-        colorString = "aqua";
-      } else {
-        colorString = "magenta";
-      }
-      break;
-    case "classic":
-    default:
-      if (voteIsLike === true) {
-        colorString = "lime";
-      } else {
-        colorString = "red";
+  
+    const formatter = Intl.NumberFormat(
+      document.documentElement.lang || userLocales || navigator.language,
+      {
+        notation: formatterNotation,
+        compactDisplay: formatterCompactDisplay,
       }
+    );
+    return formatter;
   }
-  return colorString;
-}
-
-function setEventListeners(evt) {
-  let jsInitChecktimer;
-
-  function checkForJS_Finish(check) {
-    console.log();
-    if (isShorts() || (getButtons()?.offsetParent && isVideoLoaded())) {
-      const buttons = getButtons();
-
-      if (!window.returnDislikeButtonlistenersSet) {
-        cLog("Registering button listeners...");
-        try {
-          buttons.children[0].addEventListener("click", likeClicked);
-          buttons.children[1].addEventListener("click", dislikeClicked);
-          buttons.children[0].addEventListener("touchstart", likeClicked);
-          buttons.children[1].addEventListener("touchstart", dislikeClicked);
-        } catch {
-          return;
-        } //Don't spam errors into the console
-        window.returnDislikeButtonlistenersSet = true;
+  
+  function getColorFromTheme(voteIsLike) {
+    let colorString;
+    switch (extConfig.colorTheme) {
+      case "accessible":
+        if (voteIsLike === true) {
+          colorString = "dodgerblue";
+        } else {
+          colorString = "gold";
+        }
+        break;
+      case "neon":
+        if (voteIsLike === true) {
+          colorString = "aqua";
+        } else {
+          colorString = "magenta";
+        }
+        break;
+      case "classic":
+      default:
+        if (voteIsLike === true) {
+          colorString = "lime";
+        } else {
+          colorString = "red";
+        }
+    }
+    return colorString;
+  }
+  
+  function setEventListeners(evt) {
+    let jsInitChecktimer;
+  
+    function checkForJS_Finish(check) {
+      console.log();
+      if (isShorts() || (getButtons()?.offsetParent && isVideoLoaded())) {
+        const buttons = getButtons();
+  
+        if (!window.returnDislikeButtonlistenersSet) {
+          cLog("Registering button listeners...");
+          try {
+            buttons.children[0].addEventListener("click", likeClicked);
+            buttons.children[1].addEventListener("click", dislikeClicked);
+            buttons.children[0].addEventListener("touchstart", likeClicked);
+            buttons.children[1].addEventListener("touchstart", dislikeClicked);
+          } catch {
+            return;
+          } //Don't spam errors into the console
+          window.returnDislikeButtonlistenersSet = true;
+        }
+        setInitialState();
+        clearInterval(jsInitChecktimer);
       }
-      setInitialState();
-      clearInterval(jsInitChecktimer);
     }
+  
+    cLog("Setting up...");
+    jsInitChecktimer = setInterval(checkForJS_Finish, 111);
   }
-
-  cLog("Setting up...");
-  jsInitChecktimer = setInterval(checkForJS_Finish, 111);
-}
-
-(function () {
-  "use strict";
-  window.addEventListener("yt-navigate-finish", setEventListeners, true);
-  setEventListeners();
-})();
-if (isMobile) {
-  let originalPush = history.pushState;
-  history.pushState = function (...args) {
-    window.returnDislikeButtonlistenersSet = false;
-    setEventListeners(args[2]);
-    return originalPush.apply(history, args);
-  };
-  setInterval(() => {
-    getDislikeButton().querySelector(".button-renderer-text").innerText =
-      mobileDislikes;
-  }, 1000);
-}
+  
+  (function () {
+    "use strict";
+    window.addEventListener("yt-navigate-finish", setEventListeners, true);
+    setEventListeners();
+  })();
+  if (isMobile) {
+    let originalPush = history.pushState;
+    history.pushState = function (...args) {
+      window.returnDislikeButtonlistenersSet = false;
+      setEventListeners(args[2]);
+      return originalPush.apply(history, args);
+    };
+    setInterval(() => {
+      getDislikeButton().querySelector(".button-renderer-text").innerText =
+        mobileDislikes;
+    }, 1000);
+  }
+  

+ 1 - 1
Extensions/combined/_locales/ru/messages.json

@@ -42,7 +42,7 @@
         "message": "Поддержка YouTube Shorts"
     },
     "customColors": {
-        "message": "Выбор цветов дизлайк бара и кнопок"
+        "message": "Выбор цветов панели дизлайков и кнопок"
     },
     "customNumberFormats": {
         "message": "Выбор формата чисел"

+ 1 - 1
Extensions/combined/manifest-chrome.json

@@ -2,7 +2,7 @@
   "name": "__MSG_extensionName__",
   "description": "__MSG_extensionDesc__",
   "default_locale": "en",
-  "version": "2.1.0.3",
+  "version": "3.0.0.0",
   "manifest_version": 3,
   "background": {
     "service_worker": "ryd.background.js"

+ 1 - 1
Extensions/combined/manifest-firefox.json

@@ -2,7 +2,7 @@
   "name": "__MSG_extensionName__",
   "description": "__MSG_extensionDesc__",
   "default_locale": "en",
-  "version": "2.1.0.3",
+  "version": "3.0.0.0",
   "manifest_version": 2,
   "background": {
     "scripts": ["ryd.background.js"]

+ 6 - 0
Extensions/combined/popup.html

@@ -108,6 +108,12 @@
     <span class="switchLabel">Show rounded down numbers</span>
   </label>
   <br/>
+  <label class="switch" data-hover="Make likes and dislikes format consistent">
+    <input type="checkbox" id="number_reformat_likes"/>
+    <span class="slider"/>
+    <span class="switchLabel">Re-format like numbers</span>
+  </label>
+  <br/>
   <div class="custom-select">
     <label for="number_format">Number format:</label>
     <select name="number_format" id="number_format">

+ 20 - 0
Extensions/combined/popup.js

@@ -11,6 +11,7 @@ const config = {
   numberDisplayRoundDown: true,
   showTooltipPercentage: false,
   tooltipPercentageMode: "dash_like",
+  numberDisplayReformatLikes: false,
   showAdvancedMessage:
     '<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><rect fill="none" height="24" width="24"/><path d="M19.5,12c0-0.23-0.01-0.45-0.03-0.68l1.86-1.41c0.4-0.3,0.51-0.86,0.26-1.3l-1.87-3.23c-0.25-0.44-0.79-0.62-1.25-0.42 l-2.15,0.91c-0.37-0.26-0.76-0.49-1.17-0.68l-0.29-2.31C14.8,2.38,14.37,2,13.87,2h-3.73C9.63,2,9.2,2.38,9.14,2.88L8.85,5.19 c-0.41,0.19-0.8,0.42-1.17,0.68L5.53,4.96c-0.46-0.2-1-0.02-1.25,0.42L2.41,8.62c-0.25,0.44-0.14,0.99,0.26,1.3l1.86,1.41 C4.51,11.55,4.5,11.77,4.5,12s0.01,0.45,0.03,0.68l-1.86,1.41c-0.4,0.3-0.51,0.86-0.26,1.3l1.87,3.23c0.25,0.44,0.79,0.62,1.25,0.42 l2.15-0.91c0.37,0.26,0.76,0.49,1.17,0.68l0.29,2.31C9.2,21.62,9.63,22,10.13,22h3.73c0.5,0,0.93-0.38,0.99-0.88l0.29-2.31 c0.41-0.19,0.8-0.42,1.17-0.68l2.15,0.91c0.46,0.2,1,0.02,1.25-0.42l1.87-3.23c0.25-0.44,0.14-0.99-0.26-1.3l-1.86-1.41 C19.49,12.45,19.5,12.23,19.5,12z M12.04,15.5c-1.93,0-3.5-1.57-3.5-3.5s1.57-3.5,3.5-3.5s3.5,1.57,3.5,3.5S13.97,15.5,12.04,15.5z"/></svg>',
   hideAdvancedMessage:
@@ -97,6 +98,10 @@ document.getElementById("tooltip_percentage_mode").addEventListener("change", (e
   chrome.storage.sync.set({ tooltipPercentageMode: ev.target.value });
 });
 
+document.getElementById("number_reformat_likes").addEventListener("click", (ev) => {
+  chrome.storage.sync.set({ numberDisplayReformatLikes: ev.target.checked });
+});
+
 /*   Advanced Toggle   */
 const advancedToggle = document.getElementById("advancedToggle");
 advancedToggle.addEventListener("click", () => {
@@ -128,6 +133,7 @@ function initConfig() {
   initializeNumberDisplayRoundDown();
   initializeTooltipPercentage();
   initializeTooltipPercentageMode();
+  initializeNumberDisplayReformatLikes();
 }
 
 function initializeVersionNumber() {
@@ -232,6 +238,12 @@ function updateNumberDisplayFormatContent(roundDown) {
     getNumberFormatter("standard").format(testValue);
 }
 
+function initializeNumberDisplayReformatLikes() {
+  chrome.storage.sync.get(["numberDisplayReformatLikes"], (res) => {
+    handleNumberDisplayReformatLikesChangeEvent(res.numberDisplayReformatLikes);
+  });
+}
+
 chrome.storage.onChanged.addListener(storageChangeHandler);
 
 function storageChangeHandler(changes, area) {
@@ -260,6 +272,9 @@ function storageChangeHandler(changes, area) {
   if (changes.showTooltipPercentage !== undefined) {
     handleShowTooltipPercentageChangeEvent(changes.showTooltipPercentage.newValue);
   }
+  if (changes.numberDisplayReformatLikes !== undefined) {
+    handleNumberDisplayReformatLikesChangeEvent(changes.numberDisplayReformatLikes.newValue);
+  }
 }
 
 function handleDisableVoteSubmissionChangeEvent(value) {
@@ -323,6 +338,11 @@ function handleTooltipPercentageModeChangeEvent(value) {
     .querySelector('option[value="' + value + '"]').selected = true;
 };
 
+function handleNumberDisplayReformatLikesChangeEvent(value) {
+  config.numberDisplayReformatLikes = value;
+  document.getElementById("number_reformat_likes").checked = value;
+}
+
 function getNumberFormatter(optionSelect) {
   let formatterNotation;
   let formatterCompactDisplay;

+ 29 - 12
Extensions/combined/ryd.background.js

@@ -9,10 +9,9 @@ let extConfig = {
   coloredThumbs: false,
   coloredBar: false,
   colorTheme: "classic", // classic, accessible, neon
-  // coloredThumbs: false,
-  // coloredBar: false,
   numberDisplayFormat: "compactShort", // compactShort, compactLong, standard
   numberDisplayRoundDown: true, // locale 'de' shows exact numbers by default
+  numberDisplayReformatLikes: false, // use existing (native) likes number
 };
 
 if (isChrome()) api = chrome;
@@ -74,16 +73,16 @@ api.runtime.onMessage.addListener((request, sender, sendResponse) => {
   }
 });
 
-  api.storage.sync.get(['lastShowChangelogVersion'], (details) => {
-    if (extConfig.showUpdatePopup === true &&
-      details.lastShowChangelogVersion !== chrome.runtime.getManifest().version
-      ) {
-      // keep it inside get to avoid race condition
-      api.storage.sync.set({'lastShowChangelogVersion ': chrome.runtime.getManifest().version});
-      // wait until async get runs & don't steal tab focus
-      api.tabs.create({url: api.runtime.getURL("/changelog/3/changelog_3.0.html"), active: false});
-    }
-  });
+api.storage.sync.get(['lastShowChangelogVersion'], (details) => {
+  if (extConfig.showUpdatePopup === true &&
+    details.lastShowChangelogVersion !== chrome.runtime.getManifest().version
+    ) {
+    // keep it inside get to avoid race condition
+    api.storage.sync.set({'lastShowChangelogVersion ': chrome.runtime.getManifest().version});
+    // wait until async get runs & don't steal tab focus
+    api.tabs.create({url: api.runtime.getURL("/changelog/3/changelog_3.0.html"), active: false});
+  }
+});
 
 async function sendVote(videoId, vote) {
   api.storage.sync.get(null, async (storageResult) => {
@@ -270,6 +269,9 @@ function storageChangeHandler(changes, area) {
   if (changes.numberDisplayFormat !== undefined) {
     handleNumberDisplayFormatChangeEvent(changes.numberDisplayFormat.newValue);
   }
+  if (changes.numberDisplayReformatLikes !== undefined) {
+    handleNumberDisplayReformatLikesChangeEvent(changes.numberDisplayReformatLikes.newValue);
+  }
 }
 
 function handleDisableVoteSubmissionChangeEvent(value) {
@@ -312,6 +314,10 @@ function handleColorThemeChangeEvent(value) {
   extConfig.colorTheme = value;
 }
 
+function handleNumberDisplayReformatLikesChangeEvent(value) {
+  extConfig.numberDisplayReformatLikes = value;
+}
+
 api.storage.onChanged.addListener(storageChangeHandler);
 
 function initExtConfig() {
@@ -321,6 +327,7 @@ function initExtConfig() {
   initializeColorTheme();
   initializeNumberDisplayFormat();
   initializeNumberDisplayRoundDown();
+  initializeNumberDisplayReformatLikes();
 }
 
 function initializeDisableVoteSubmission() {
@@ -384,6 +391,16 @@ function initializeNumberDisplayFormat() {
   });
 }
 
+function initializeNumberDisplayReformatLikes() {
+  api.storage.sync.get(["numberDisplayReformatLikes"], (res) => {
+    if (res.numberDisplayReformatLikes === undefined) {
+      api.storage.sync.set({ numberDisplayReformatLikes: false });
+    } else {
+      extConfig.numberDisplayReformatLikes = res.numberDisplayReformatLikes;
+    }
+  });
+}
+
 function isChrome() {
   return typeof chrome !== "undefined" && typeof chrome.runtime !== "undefined";
 }

+ 7 - 0
Extensions/combined/src/events.js

@@ -130,6 +130,9 @@ function storageChangeHandler(changes, area) {
   if (changes.numberDisplayFormat !== undefined) {
     handleNumberDisplayFormatChangeEvent(changes.numberDisplayFormat.newValue);
   }
+  if (changes.numberDisplayReformatLikes !== undefined) {
+    handleNumberDisplayReformatLikesChangeEvent(changes.numberDisplayReformatLikes.newValue);
+  }
 }
 
 function handleDisableVoteSubmissionChangeEvent(value) {
@@ -157,6 +160,10 @@ function handleNumberDisplayRoundDownChangeEvent(value) {
   extConfig.numberDisplayRoundDown = value;
 }
 
+function handleNumberDisplayReformatLikesChangeEvent(value) {
+  extConfig.numberDisplayReformatLikes = value;
+}
+
 export {
   sendVote,
   sendVideoIds,

+ 64 - 2
Extensions/combined/src/state.js

@@ -25,6 +25,7 @@ let extConfig = {
   numberDisplayRoundDown: true,
   showTooltipPercentage: false,
   tooltipPercentageMode: "dash_like",
+  numberDisplayReformatLikes: false,
 };
 
 let storedData = {
@@ -41,6 +42,37 @@ function isShorts() {
   return location.pathname.startsWith("/shorts");
 }
 
+
+let mutationObserver = new Object();
+
+if (isShorts() && mutationObserver.exists !== true) {
+  cLog('initializing mutation observer')
+  mutationObserver.options = {
+    childList: false,
+    attributes: true,
+    subtree: false
+  };
+  mutationObserver.exists = true;
+  mutationObserver.observer = new MutationObserver( function(mutationList, observer) {
+    mutationList.forEach( (mutation) => {
+      if (mutation.type === 'attributes' && 
+        mutation.target.nodeName === 'TP-YT-PAPER-BUTTON' && 
+        mutation.target.id === 'button') {
+        // cLog('Short thumb button status changed');
+        if (mutation.target.getAttribute('aria-pressed') === 'true') {
+          mutation.target.style.color =
+            (mutation.target.parentElement.parentElement.id === 'like-button') ? 
+            getColorFromTheme(true) : getColorFromTheme(false);
+        } else {
+          mutation.target.style.color = 'unset';
+        }
+        return;
+      }
+      cLog('unexpected mutation observer event: ' + mutation.target + mutation.type);
+    });
+  });
+}
+
 function isLikesDisabled() {
   // return true if the like button's text doesn't contain any number
   if (isMobile()) {
@@ -125,12 +157,31 @@ function getLikeCountFromButton() {
 function processResponse(response, storedData) {
   const formattedDislike = numberFormat(response.dislikes);
   setDislikes(formattedDislike);
+  if (extConfig.numberDisplayReformatLikes === true) {
+    const nativeLikes = getLikeCountFromButton();
+    if (nativeLikes !== false) {
+      setLikes(numberFormat(nativeLikes));
+    }
+  }
   storedData.dislikes = parseInt(response.dislikes);
   storedData.likes = getLikeCountFromButton() || parseInt(response.likes);
   createRateBar(storedData.likes, storedData.dislikes);
   if (extConfig.coloredThumbs === true) {
-    getLikeButton().style.color = getColorFromTheme(true);
-    getDislikeButton().style.color = getColorFromTheme(false);
+    if (isShorts()) { // for shorts, leave deactived buttons in default color
+      let shortLikeButton = getLikeButton().querySelector('tp-yt-paper-button#button');
+      let shortDislikeButton = getDislikeButton().querySelector('tp-yt-paper-button#button');
+      if (shortLikeButton.getAttribute('aria-pressed') === 'true') {
+        shortLikeButton.style.color = getColorFromTheme(true);
+      }
+      if (shortDislikeButton.getAttribute('aria-pressed') === 'true') {
+        shortDislikeButton.style.color = getColorFromTheme(false);
+      }
+      mutationObserver.observer.observe(shortLikeButton, mutationObserver.options);
+      mutationObserver.observer.observe(shortDislikeButton, mutationObserver.options);
+    } else {
+      getLikeButton().style.color = getColorFromTheme(true);
+      getDislikeButton().style.color = getColorFromTheme(false);
+    }
   }
 }
 
@@ -190,6 +241,7 @@ function initExtConfig() {
   initializeNumberDisplayRoundDown();
   initializeTooltipPercentage();
   initializeTooltipPercentageMode();
+  initializeNumberDisplayReformatLikes();
 }
 
 function initializeDisableVoteSubmission() {
@@ -272,6 +324,16 @@ function initializeTooltipPercentageMode() {
   });
 }
 
+function initializeNumberDisplayReformatLikes() {
+  getBrowser().storage.sync.get(["numberDisplayReformatLikes"], (res) => {
+    if (res.numberDisplayReformatLikes === undefined) {
+      getBrowser().storage.sync.set({ numberDisplayReformatLikes: false });
+    } else {
+      extConfig.numberDisplayReformatLikes = res.numberDisplayReformatLikes;
+    }
+  });
+}
+
 export {
   isMobile,
   isShorts,

+ 20 - 0
extension-description-store-russian.txt

@@ -0,0 +1,20 @@
+Return YouTube Dislike восстанавливает возвращает возможность видеть отметки «Не нравится» на YouTube.
+
+Если не работает: откройте вкладку расширений (chrome://extensions/), отключите это расширение и включите его снова. Это ошибка в chromium, которая в некоторых случаях приводит к сбою расширения. Это должно устранить большинство проблем. Надеюсь, команда chromium скоро исправит это
+
+Начиная с 13 декабря 2021 года YouTube удалил возможность видеть отметки «Не нравится» из своего API.
+Это расширение призвано вернуть власть пользователям, используя сочетание архивных данных о отметках «Нравится» и «Не нравится», а также «Нравится» и «Не нравится», сделанных пользователями расширения, чтобы показать наиболее точные рейтинги.
+
+В настоящее время более 200 миллионов данных об отметках «Нравится» и «Не нравится» к видео хранятся до 13 декабря 2021 года
+
+Активно растёт и обновляется с новыми загрузками видео после 13 декабря 2021 года
+
+Чем больше пользователей используют расширение, тем точнее оно будет
+
+Непопулярные видео, загруженные после 13 декабря 2021 года, могут содержать менее точные данные, чем более популярные видео.
+
+Это расширение в настоящее время находится в активной стадии разработки, поэтому, если у вас возникнут какие-либо проблемы, не стесняйтесь сообщать о них на нашей странице GitHub или на нашем сервере Discord.
+
+Больше возможностей появится в ближайшее время! 
+
+https://github.com/Anarios/return-youtube-dislike