mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-02 10:52:20 +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";
|
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 +
|
||||||
@@ -48,7 +50,7 @@ function createRateBar(likes, dislikes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isShorts()) {
|
if (!isShorts()) {
|
||||||
if (!rateBar && !isMobile()) {
|
if (!isMobile()) {
|
||||||
let colorLikeStyle = "";
|
let colorLikeStyle = "";
|
||||||
let colorDislikeStyle = "";
|
let colorDislikeStyle = "";
|
||||||
if (extConfig.coloredBar) {
|
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