mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-24 15:23:02 +01:00
1 parent
8eef50918d
commit
7db9d9d30d
1 file changed
+9
-5
@@ -10,11 +10,9 @@ import {
|
||||
import { cLog, getColorFromTheme } from "./utils";
|
||||
|
||||
function createRateBar(likes, dislikes) {
|
||||
let ratebar = document.getElementById("ryd-bar-container");
|
||||
if (ratebar) {
|
||||
ratebar.parentNode.removeChild(ratebar);
|
||||
}
|
||||
if (!isLikesDisabled()) {
|
||||
let rateBar = document.getElementById("ryd-bar-container");
|
||||
|
||||
const widthPx =
|
||||
getLikeButton().clientWidth +
|
||||
getDislikeButton().clientWidth +
|
||||
@@ -50,7 +48,7 @@ function createRateBar(likes, dislikes) {
|
||||
}
|
||||
|
||||
if (!isShorts()) {
|
||||
if (!isMobile()) {
|
||||
if (!rateBar && !isMobile()) {
|
||||
let colorLikeStyle = "";
|
||||
let colorDislikeStyle = "";
|
||||
if (extConfig.coloredBar) {
|
||||
@@ -112,6 +110,12 @@ function createRateBar(likes, dislikes) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cLog("removing bar");
|
||||
let ratebar = document.getElementById("ryd-bar-container");
|
||||
if (ratebar) {
|
||||
ratebar.parentNode.removeChild(ratebar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user