Advertisement
Guest User

Return YouTube Dislike (LEGACY VERSION)

a guest
Sep 1st, 2023
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.13 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Return YouTube Dislike Legacy
  3. // @namespace https://www.returnyoutubedislike.com/
  4. // @homepage https://www.returnyoutubedislike.com/
  5. // @version 20230510.18.50
  6. // @encoding utf-8
  7. // @description Return of the YouTube Dislike, Based off https://www.returnyoutubedislike.com/
  8. // @icon https://github.com/Anarios/return-youtube-dislike/raw/main/Icons/Return%20Youtube%20Dislike%20-%20Transparent.png
  9. // @author Anarios & JRWR
  10. // @match *://*.youtube.com/*
  11. // @exclude *://music.youtube.com/*
  12. // @exclude *://*.music.youtube.com/*
  13. // @compatible chrome
  14. // @compatible firefox
  15. // @compatible opera
  16. // @compatible safari
  17. // @compatible edge
  18. // @grant GM.xmlHttpRequest
  19. // @connect youtube.com
  20. // @grant GM_addStyle
  21. // @run-at document-end
  22. // ==/UserScript==
  23.  
  24. const extConfig = {
  25. // BEGIN USER OPTIONS
  26. // You may change the following variables to allowed values listed in the corresponding brackets (* means default). Keep the style and keywords intact.
  27. showUpdatePopup: false, // [true, false*] Show a popup tab after extension update (See what's new)
  28. disableVoteSubmission: false, // [true, false*] Disable like/dislike submission (Stops counting your likes and dislikes)
  29. coloredThumbs: false, // [true, false*] Colorize thumbs (Use custom colors for thumb icons)
  30. coloredBar: false, // [true, false*] Colorize ratio bar (Use custom colors for ratio bar)
  31. colorTheme: "classic", // [classic*, accessible, neon] Color theme (red/green, blue/yellow, pink/cyan)
  32. 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)
  33. numberDisplayRoundDown: true, // [true*, false] Round down numbers (Show rounded down numbers)
  34. tooltipPercentageMode: "none", // [none*, dash_like, dash_dislike, both, only_like, only_dislike] Mode of showing percentage in like/dislike bar tooltip.
  35. numberDisplayReformatLikes: false, // [true, false*] Re-format like numbers (Make likes and dislikes format consistent)
  36. // END USER OPTIONS
  37. };
  38.  
  39. const LIKED_STATE = "LIKED_STATE";
  40. const DISLIKED_STATE = "DISLIKED_STATE";
  41. const NEUTRAL_STATE = "NEUTRAL_STATE";
  42. let previousState = 3; //1=LIKED, 2=DISLIKED, 3=NEUTRAL
  43. let likesvalue = 0;
  44. let dislikesvalue = 0;
  45.  
  46. let isMobile = location.hostname == "m.youtube.com";
  47. let isShorts = () => location.pathname.startsWith("/shorts");
  48. let mobileDislikes = 0;
  49. function cLog(text, subtext = "") {
  50. subtext = subtext.trim() === "" ? "" : `(${subtext})`;
  51. console.log(`[Return YouTube Dislikes] ${text} ${subtext}`);
  52. }
  53.  
  54. function isInViewport(element) {
  55. const rect = element.getBoundingClientRect();
  56. const height = innerHeight || document.documentElement.clientHeight;
  57. const width = innerWidth || document.documentElement.clientWidth;
  58. return (
  59. // When short (channel) is ignored, the element (like/dislike AND short itself) is
  60. // hidden with a 0 DOMRect. In this case, consider it outside of Viewport
  61. !(rect.top == 0 && rect.left == 0 && rect.bottom == 0 && rect.right == 0) &&
  62. rect.top >= 0 &&
  63. rect.left >= 0 &&
  64. rect.bottom <= height &&
  65. rect.right <= width
  66. );
  67. }
  68.  
  69. function getButtons() {
  70. if (isShorts()) {
  71. let elements = document.querySelectorAll(
  72. isMobile
  73. ? "ytm-like-button-renderer"
  74. : "#like-button > ytd-like-button-renderer"
  75. );
  76. for (let element of elements) {
  77. if (isInViewport(element)) {
  78. return element;
  79. }
  80. }
  81. }
  82. if (isMobile) {
  83. return (
  84. document.querySelector(".slim-video-action-bar-actions .segmented-buttons") ??
  85. document.querySelector(".slim-video-action-bar-actions")
  86. );
  87. }
  88. if (document.getElementById("menu-container")?.offsetParent === null) {
  89. return (
  90. document.querySelector("ytd-menu-renderer.ytd-watch-metadata > div") ??
  91. document.querySelector("ytd-menu-renderer.ytd-video-primary-info-renderer > div")
  92. );
  93. } else {
  94. return document
  95. .getElementById("menu-container")
  96. ?.querySelector("#top-level-buttons-computed");
  97. }
  98. }
  99.  
  100. function getDislikeButton() {
  101. return getButtons().children[0].tagName ===
  102. "YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER"
  103. ? getButtons().children[0].children[1] === undefined ? document.querySelector("#segmented-dislike-button") : getButtons().children[0].children[1]
  104. : getButtons().children[1];
  105. }
  106.  
  107. function getLikeButton() {
  108. return getButtons().children[0].tagName ===
  109. "YTD-SEGMENTED-LIKE-DISLIKE-BUTTON-RENDERER"
  110. ? document.querySelector("#segmented-like-button") !== null ? document.querySelector("#segmented-like-button") : getButtons().children[0].children[0]
  111. : getButtons().children[0];
  112. }
  113.  
  114. function getLikeTextContainer() {
  115. return (
  116. getLikeButton().querySelector("#text") ??
  117. getLikeButton().getElementsByTagName("yt-formatted-string")[0] ??
  118. getLikeButton().querySelector("span[role='text']")
  119. );
  120. }
  121.  
  122.  
  123. function getDislikeTextContainer() {
  124. let result =
  125. getDislikeButton().querySelector("#text") ??
  126. getDislikeButton().getElementsByTagName("yt-formatted-string")[0] ??
  127. getDislikeButton().querySelector("span[role='text']")
  128. if (result === null) {
  129. let textSpan = document.createElement("span");
  130. textSpan.id = "text";
  131. getDislikeButton().querySelector("button").appendChild(textSpan);
  132. getDislikeButton().querySelector("button").style.width = "auto";
  133. result = getDislikeButton().querySelector("#text");
  134. }
  135. return result;
  136. }
  137.  
  138. let mutationObserver = new Object();
  139.  
  140. if (isShorts() && mutationObserver.exists !== true) {
  141. cLog("initializing mutation observer");
  142. mutationObserver.options = {
  143. childList: false,
  144. attributes: true,
  145. subtree: false,
  146. };
  147. mutationObserver.exists = true;
  148. mutationObserver.observer = new MutationObserver(function (
  149. mutationList,
  150. observer
  151. ) {
  152. mutationList.forEach((mutation) => {
  153. if (
  154. mutation.type === "attributes" &&
  155. mutation.target.nodeName === "TP-YT-PAPER-BUTTON" &&
  156. mutation.target.id === "button"
  157. ) {
  158. cLog("Short thumb button status changed");
  159. if (mutation.target.getAttribute("aria-pressed") === "true") {
  160. mutation.target.style.color =
  161. mutation.target.parentElement.parentElement.id === "like-button"
  162. ? getColorFromTheme(true)
  163. : getColorFromTheme(false);
  164. } else {
  165. mutation.target.style.color = "unset";
  166. }
  167. return;
  168. }
  169. cLog(
  170. "unexpected mutation observer event: " + mutation.target + mutation.type
  171. );
  172. });
  173. });
  174. }
  175.  
  176. function isVideoLiked() {
  177. if (isMobile) {
  178. return (
  179. getLikeButton().querySelector("button").getAttribute("aria-label") ==
  180. "true"
  181. );
  182. }
  183. return getLikeButton().classList.contains("style-default-active");
  184. }
  185.  
  186. function isVideoDisliked() {
  187. if (isMobile) {
  188. return (
  189. getDislikeButton().querySelector("button").getAttribute("aria-label") ==
  190. "true"
  191. );
  192. }
  193. return getDislikeButton().classList.contains("style-default-active");
  194. }
  195.  
  196. function isVideoNotLiked() {
  197. if (isMobile) {
  198. return !isVideoLiked();
  199. }
  200. return getLikeButton().classList.contains("style-text");
  201. }
  202.  
  203. function isVideoNotDisliked() {
  204. if (isMobile) {
  205. return !isVideoDisliked();
  206. }
  207. return getDislikeButton().classList.contains("style-text");
  208. }
  209.  
  210. function checkForUserAvatarButton() {
  211. if (isMobile) {
  212. return;
  213. }
  214. if (document.querySelector("#avatar-btn")) {
  215. return true;
  216. } else {
  217. return false;
  218. }
  219. }
  220.  
  221. function getState() {
  222. if (isVideoLiked()) {
  223. return LIKED_STATE;
  224. }
  225. if (isVideoDisliked()) {
  226. return DISLIKED_STATE;
  227. }
  228. return NEUTRAL_STATE;
  229. }
  230.  
  231. function setLikes(likesCount) {
  232. if (isMobile) {
  233. getButtons().children[0].querySelector(".button-renderer-text").innerText =
  234. likesCount;
  235. return;
  236. }
  237. getLikeTextContainer().innerText = likesCount;
  238. }
  239.  
  240. function setDislikes(dislikesCount) {
  241. if (isMobile) {
  242. mobileDislikes = dislikesCount;
  243. return;
  244. }
  245. getDislikeTextContainer()?.removeAttribute('is-empty');
  246. getDislikeTextContainer().innerText = dislikesCount;
  247. }
  248.  
  249. function getLikeCountFromButton() {
  250. try {
  251. if (isShorts()) {
  252. //Youtube Shorts don't work with this query. It's not necessary; we can skip it and still see the results.
  253. //It should be possible to fix this function, but it's not critical to showing the dislike count.
  254. return false;
  255. }
  256. let likeButton = getLikeButton()
  257. .querySelector("yt-formatted-string#text") ??
  258. getLikeButton().querySelector("button");
  259.  
  260. let likesStr = likeButton.getAttribute("aria-label")
  261. .replace(/\D/g, "");
  262. return likesStr.length > 0 ? parseInt(likesStr) : false;
  263. }
  264. catch {
  265. return false;
  266. }
  267.  
  268. }
  269.  
  270. (typeof GM_addStyle != "undefined"
  271. ? GM_addStyle
  272. : (styles) => {
  273. let styleNode = document.createElement("style");
  274. styleNode.type = "text/css";
  275. styleNode.innerText = styles;
  276. document.head.appendChild(styleNode);
  277. })(`
  278. #return-youtube-dislike-bar-container {
  279. background: var(--yt-spec-icon-disabled);
  280. border-radius: 2px;
  281. }
  282.  
  283. #return-youtube-dislike-bar {
  284. background: var(--yt-spec-text-primary);
  285. border-radius: 2px;
  286. transition: all 0.15s ease-in-out;
  287. }
  288.  
  289. .ryd-tooltip {
  290. position: relative;
  291. display: block;
  292. height: 2px;
  293. top: 9px;
  294. }
  295.  
  296. .ryd-tooltip-bar-container {
  297. width: 100%;
  298. height: 2px;
  299. position: absolute;
  300. padding-top: 6px;
  301. padding-bottom: 28px;
  302. top: -6px;
  303. }
  304. `);
  305.  
  306. function createRateBar(likes, dislikes) {
  307. if (isMobile) {
  308. return;
  309. }
  310. let rateBar = document.getElementById("return-youtube-dislike-bar-container");
  311.  
  312. const widthPx =
  313. getButtons().children[0].clientWidth +
  314. getButtons().children[1].clientWidth +
  315. 8;
  316.  
  317. const widthPercent =
  318. likes + dislikes > 0 ? (likes / (likes + dislikes)) * 100 : 50;
  319.  
  320. var likePercentage = parseFloat(widthPercent.toFixed(1));
  321. const dislikePercentage = (100 - likePercentage).toLocaleString();
  322. likePercentage = likePercentage.toLocaleString();
  323.  
  324. var tooltipInnerHTML;
  325. switch (extConfig.tooltipPercentageMode) {
  326. case "dash_like":
  327. tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}&nbsp;&nbsp;-&nbsp;&nbsp;${likePercentage}%`;
  328. break;
  329. case "dash_dislike":
  330. tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}&nbsp;&nbsp;-&nbsp;&nbsp;${dislikePercentage}%`;
  331. break;
  332. case "both":
  333. tooltipInnerHTML = `${likePercentage}%&nbsp;/&nbsp;${dislikePercentage}%`;
  334. break;
  335. case "only_like":
  336. tooltipInnerHTML = `${likePercentage}%`;
  337. break;
  338. case "only_dislike":
  339. tooltipInnerHTML = `${dislikePercentage}%`;
  340. break;
  341. default:
  342. tooltipInnerHTML = `${likes.toLocaleString()}&nbsp;/&nbsp;${dislikes.toLocaleString()}`;
  343. }
  344.  
  345. if (!rateBar && !isMobile) {
  346. let colorLikeStyle = "";
  347. let colorDislikeStyle = "";
  348. if (extConfig.coloredBar) {
  349. colorLikeStyle = "; background-color: " + getColorFromTheme(true);
  350. colorDislikeStyle = "; background-color: " + getColorFromTheme(false);
  351. }
  352.  
  353. document.getElementById("menu-container").insertAdjacentHTML(
  354. "beforeend",
  355. `
  356. <div class="ryd-tooltip" style="width: ${widthPx}px">
  357. <div class="ryd-tooltip-bar-container">
  358. <div
  359. id="return-youtube-dislike-bar-container"
  360. style="width: 100%; height: 2px;${colorDislikeStyle}"
  361. >
  362. <div
  363. id="return-youtube-dislike-bar"
  364. style="width: ${widthPercent}%; height: 100%${colorDislikeStyle}"
  365. ></div>
  366. </div>
  367. </div>
  368. <tp-yt-paper-tooltip position="top" id="ryd-dislike-tooltip" class="style-scope ytd-sentiment-bar-renderer" role="tooltip" tabindex="-1">
  369. <!--css-build:shady-->${tooltipInnerHTML}
  370. </tp-yt-paper-tooltip>
  371. </div>
  372. `
  373. );
  374. } else {
  375. document.getElementById(
  376. "return-youtube-dislike-bar-container"
  377. ).style.width = widthPx + "px";
  378. document.getElementById("return-youtube-dislike-bar").style.width =
  379. widthPercent + "%";
  380.  
  381. document.querySelector("#ryd-dislike-tooltip > #tooltip").innerHTML =
  382. tooltipInnerHTML;
  383.  
  384. if (extConfig.coloredBar) {
  385. document.getElementById(
  386. "return-youtube-dislike-bar-container"
  387. ).style.backgroundColor = getColorFromTheme(false);
  388. document.getElementById(
  389. "return-youtube-dislike-bar"
  390. ).style.backgroundColor = getColorFromTheme(true);
  391. }
  392. }
  393. }
  394.  
  395. function setState() {
  396. cLog("Fetching votes...");
  397. let statsSet = false;
  398.  
  399. fetch(
  400. `https://returnyoutubedislikeapi.com/votes?videoId=${getVideoId()}`
  401. ).then((response) => {
  402. response.json().then((json) => {
  403. if (json && !("traceId" in response) && !statsSet) {
  404. const { dislikes, likes } = json;
  405. cLog(`Received count: ${dislikes}`);
  406. likesvalue = likes;
  407. dislikesvalue = dislikes;
  408. setDislikes(numberFormat(dislikes));
  409. if (extConfig.numberDisplayReformatLikes === true) {
  410. const nativeLikes = getLikeCountFromButton();
  411. if (nativeLikes !== false) {
  412. setLikes(numberFormat(nativeLikes));
  413. }
  414. }
  415. createRateBar(likes, dislikes);
  416. if (extConfig.coloredThumbs === true) {
  417. if (isShorts()) {
  418. // for shorts, leave deactived buttons in default color
  419. let shortLikeButton = getLikeButton().querySelector(
  420. "tp-yt-paper-button#button"
  421. );
  422. let shortDislikeButton = getDislikeButton().querySelector(
  423. "tp-yt-paper-button#button"
  424. );
  425. if (shortLikeButton.getAttribute("aria-pressed") === "true") {
  426. shortLikeButton.style.color = getColorFromTheme(true);
  427. }
  428. if (shortDislikeButton.getAttribute("aria-pressed") === "true") {
  429. shortDislikeButton.style.color = getColorFromTheme(false);
  430. }
  431. mutationObserver.observer.observe(
  432. shortLikeButton,
  433. mutationObserver.options
  434. );
  435. mutationObserver.observer.observe(
  436. shortDislikeButton,
  437. mutationObserver.options
  438. );
  439. } else {
  440. getLikeButton().style.color = getColorFromTheme(true);
  441. getDislikeButton().style.color = getColorFromTheme(false);
  442. }
  443. }
  444. }
  445. });
  446. });
  447. }
  448.  
  449. function likeClicked() {
  450. if (checkForUserAvatarButton() == true) {
  451. if (previousState == 1) {
  452. likesvalue--;
  453. createRateBar(likesvalue, dislikesvalue);
  454. setDislikes(numberFormat(dislikesvalue));
  455. previousState = 3;
  456. } else if (previousState == 2) {
  457. likesvalue++;
  458. dislikesvalue--;
  459. setDislikes(numberFormat(dislikesvalue));
  460. createRateBar(likesvalue, dislikesvalue);
  461. previousState = 1;
  462. } else if (previousState == 3) {
  463. likesvalue++;
  464. createRateBar(likesvalue, dislikesvalue);
  465. previousState = 1;
  466. }
  467. if (extConfig.numberDisplayReformatLikes === true) {
  468. const nativeLikes = getLikeCountFromButton();
  469. if (nativeLikes !== false) {
  470. setLikes(numberFormat(nativeLikes));
  471. }
  472. }
  473. }
  474. }
  475.  
  476. function dislikeClicked() {
  477. if (checkForUserAvatarButton() == true) {
  478. if (previousState == 3) {
  479. dislikesvalue++;
  480. setDislikes(numberFormat(dislikesvalue));
  481. createRateBar(likesvalue, dislikesvalue);
  482. previousState = 2;
  483. } else if (previousState == 2) {
  484. dislikesvalue--;
  485. setDislikes(numberFormat(dislikesvalue));
  486. createRateBar(likesvalue, dislikesvalue);
  487. previousState = 3;
  488. } else if (previousState == 1) {
  489. likesvalue--;
  490. dislikesvalue++;
  491. setDislikes(numberFormat(dislikesvalue));
  492. createRateBar(likesvalue, dislikesvalue);
  493. previousState = 2;
  494. if (extConfig.numberDisplayReformatLikes === true) {
  495. const nativeLikes = getLikeCountFromButton();
  496. if (nativeLikes !== false) {
  497. setLikes(numberFormat(nativeLikes));
  498. }
  499. }
  500. }
  501. }
  502. }
  503.  
  504. function setInitialState() {
  505. setState();
  506. }
  507.  
  508. function getVideoId() {
  509. const urlObject = new URL(window.location.href);
  510. const pathname = urlObject.pathname;
  511. if (pathname.startsWith("/clip")) {
  512. return document.querySelector("meta[itemprop='videoId']").content;
  513. } else {
  514. if (pathname.startsWith("/shorts")) {
  515. return pathname.slice(8);
  516. }
  517. return urlObject.searchParams.get("v");
  518. }
  519. }
  520.  
  521. function isVideoLoaded() {
  522. if (isMobile) {
  523. return document.getElementById("player").getAttribute("loading") == "false";
  524. }
  525. const videoId = getVideoId();
  526.  
  527. return (
  528. document.querySelector(`ytd-watch-flexy[video-id='${videoId}']`) !== null
  529. );
  530. }
  531.  
  532. function roundDown(num) {
  533. if (num < 1000) return num;
  534. const int = Math.floor(Math.log10(num) - 2);
  535. const decimal = int + (int % 3 ? 1 : 0);
  536. const value = Math.floor(num / 10 ** decimal);
  537. return value * 10 ** decimal;
  538. }
  539.  
  540. function numberFormat(numberState) {
  541. let numberDisplay;
  542. if (extConfig.numberDisplayRoundDown === false) {
  543. numberDisplay = numberState;
  544. } else {
  545. numberDisplay = roundDown(numberState);
  546. }
  547. return getNumberFormatter(extConfig.numberDisplayFormat).format(
  548. numberDisplay
  549. );
  550. }
  551.  
  552. function getNumberFormatter(optionSelect) {
  553. let userLocales;
  554. if (document.documentElement.lang) {
  555. userLocales = document.documentElement.lang;
  556. } else if (navigator.language) {
  557. userLocales = navigator.language;
  558. } else {
  559. try {
  560. userLocales = new URL(
  561. Array.from(document.querySelectorAll("head > link[rel='search']"))
  562. ?.find((n) => n?.getAttribute("href")?.includes("?locale="))
  563. ?.getAttribute("href")
  564. )?.searchParams?.get("locale");
  565. } catch {
  566. cLog(
  567. "Cannot find browser locale. Use en as default for number formatting."
  568. );
  569. userLocales = "en";
  570. }
  571. }
  572.  
  573. let formatterNotation;
  574. let formatterCompactDisplay;
  575. switch (optionSelect) {
  576. case "compactLong":
  577. formatterNotation = "compact";
  578. formatterCompactDisplay = "long";
  579. break;
  580. case "standard":
  581. formatterNotation = "standard";
  582. formatterCompactDisplay = "short";
  583. break;
  584. case "compactShort":
  585. default:
  586. formatterNotation = "compact";
  587. formatterCompactDisplay = "short";
  588. }
  589.  
  590. const formatter = Intl.NumberFormat(userLocales, {
  591. notation: formatterNotation,
  592. compactDisplay: formatterCompactDisplay,
  593. });
  594. return formatter;
  595. }
  596.  
  597. function getColorFromTheme(voteIsLike) {
  598. let colorString;
  599. switch (extConfig.colorTheme) {
  600. case "accessible":
  601. if (voteIsLike === true) {
  602. colorString = "dodgerblue";
  603. } else {
  604. colorString = "gold";
  605. }
  606. break;
  607. case "neon":
  608. if (voteIsLike === true) {
  609. colorString = "aqua";
  610. } else {
  611. colorString = "magenta";
  612. }
  613. break;
  614. case "classic":
  615. default:
  616. if (voteIsLike === true) {
  617. colorString = "lime";
  618. } else {
  619. colorString = "red";
  620. }
  621. }
  622. return colorString;
  623. }
  624.  
  625. function setEventListeners(evt) {
  626. let jsInitChecktimer;
  627.  
  628. function checkForJS_Finish() {
  629. //console.log();
  630. if (isShorts() || (getButtons()?.offsetParent && isVideoLoaded())) {
  631. const buttons = getButtons();
  632.  
  633. if (!window.returnDislikeButtonlistenersSet) {
  634. cLog("Registering button listeners...");
  635. try {
  636. getLikeButton().addEventListener("click", likeClicked);
  637. getDislikeButton().addEventListener("click", dislikeClicked);
  638. getLikeButton().addEventListener("touchstart", likeClicked);
  639. getDislikeButton().addEventListener("touchstart", dislikeClicked);
  640. } catch {
  641. return;
  642. } //Don't spam errors into the console
  643. window.returnDislikeButtonlistenersSet = true;
  644. }
  645. setInitialState();
  646. clearInterval(jsInitChecktimer);
  647. }
  648. }
  649.  
  650. cLog("Setting up...");
  651. jsInitChecktimer = setInterval(checkForJS_Finish, 111);
  652. }
  653.  
  654. (function () {
  655. "use strict";
  656. window.addEventListener("yt-navigate-finish", setEventListeners, true);
  657. setEventListeners();
  658. })();
  659. if (isMobile) {
  660. let originalPush = history.pushState;
  661. history.pushState = function (...args) {
  662. window.returnDislikeButtonlistenersSet = false;
  663. setEventListeners(args[2]);
  664. return originalPush.apply(history, args);
  665. };
  666. setInterval(() => {
  667. if(getDislikeButton().querySelector(".button-renderer-text") === null){
  668. getDislikeTextContainer().innerText = mobileDislikes;
  669. }
  670. else{
  671. getDislikeButton().querySelector(".button-renderer-text").innerText =
  672. mobileDislikes;
  673. }
  674. }, 1000);
  675. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement