|
@@ -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);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|