mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-03 19:31:20 +01:00
1 parent
8eef50918d
commit
7db9d9d30d
1 file changed
+9
-5
@@ -10,11 +10,9 @@ import {
|
|||||||
import { cLog, getColorFromTheme } from "./utils";
|
import { cLog, getColorFromTheme } from "./utils";
|
||||||
|
|
||||||
function createRateBar(likes, dislikes) {
|
function createRateBar(likes, dislikes) {
|
||||||
let ratebar = document.getElementById("ryd-bar-container");
|
|
||||||
if (ratebar) {
|
|
||||||
ratebar.parentNode.removeChild(ratebar);
|
|
||||||
}
|
|
||||||
if (!isLikesDisabled()) {
|
if (!isLikesDisabled()) {
|
||||||
|
let rateBar = document.getElementById("ryd-bar-container");
|
||||||
|
|
||||||
const widthPx =
|
const widthPx =
|
||||||
getLikeButton().clientWidth +
|
getLikeButton().clientWidth +
|
||||||
getDislikeButton().clientWidth +
|
getDislikeButton().clientWidth +
|
||||||
@@ -50,7 +48,7 @@ function createRateBar(likes, dislikes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isShorts()) {
|
if (!isShorts()) {
|
||||||
if (!isMobile()) {
|
if (!rateBar && !isMobile()) {
|
||||||
let colorLikeStyle = "";
|
let colorLikeStyle = "";
|
||||||
let colorDislikeStyle = "";
|
let colorDislikeStyle = "";
|
||||||
if (extConfig.coloredBar) {
|
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