mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-23 14:53:01 +01:00
fix disappearing rate bar
This commit is contained in:
1 parent
d12539d3bb
commit
8eef50918d
1 file changed
+5
-9
@@ -10,9 +10,11 @@ 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 +
|
||||
@@ -48,7 +50,7 @@ function createRateBar(likes, dislikes) {
|
||||
}
|
||||
|
||||
if (!isShorts()) {
|
||||
if (!rateBar && !isMobile()) {
|
||||
if (!isMobile()) {
|
||||
let colorLikeStyle = "";
|
||||
let colorDislikeStyle = "";
|
||||
if (extConfig.coloredBar) {
|
||||
@@ -110,12 +112,6 @@ 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