From 9a44acf89dfaafea2698f3d7d6b45b327a71905f Mon Sep 17 00:00:00 2001 From: sy-b <94835959+sy-b@users.noreply.github.com> Date: Fri, 10 Mar 2023 18:38:11 +0000 Subject: [PATCH] Show dislikes again on new YT UI (01) (2) (#886) Signed-off-by: sy-b <94835959+sy-b@users.noreply.github.com> --- Extensions/combined/src/state.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Extensions/combined/src/state.js b/Extensions/combined/src/state.js index 7a4ae32..56ba99d 100644 --- a/Extensions/combined/src/state.js +++ b/Extensions/combined/src/state.js @@ -151,6 +151,18 @@ function setDislikes(dislikesCount) { return; } getDislikeTextContainer().innerText = dislikesCount; + + try { + let likeButton = document.querySelector("#segmented-like-button > ytd-toggle-button-renderer > yt-button-shape > button > div.cbox.yt-spec-button-shape-next--button-text-content > span") + let dislikeButton = document.querySelector("#segmented-dislike-button > ytd-toggle-button-renderer > yt-button-shape > button") + dislikeButton.appendChild(likeButton.cloneNode(true)) + document.querySelector('#segmented-dislike-button > ytd-toggle-button-renderer > yt-button-shape > button').classList.remove('yt-spec-button-shape-next--icon-button') + dislikeButton.lastChild.textContent = dislikesCount + } + finally { + cLg("If you still don't see the dislike, please reach out to us on Github or Discord") + } + } else { cLog("likes count disabled by creator"); if (isMobile()) {