mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-03 03:11:23 +01:00
Testing prettier commit hooks
This commit is contained in:
1 parent
fbf80ab174
commit
47517ce0bd
1 file changed
+10
-8
@@ -13,7 +13,7 @@ function createRateBar(likes, dislikes) {
|
|||||||
let rateBar = document.getElementById("ryd-bar-container");
|
let rateBar = document.getElementById("ryd-bar-container");
|
||||||
if (!isLikesDisabled()) {
|
if (!isLikesDisabled()) {
|
||||||
// sometimes rate bar is hidden
|
// sometimes rate bar is hidden
|
||||||
if(rateBar && !isInViewport(rateBar)){
|
if (rateBar && !isInViewport(rateBar)) {
|
||||||
rateBar.remove();
|
rateBar.remove();
|
||||||
rateBar = null;
|
rateBar = null;
|
||||||
}
|
}
|
||||||
@@ -54,16 +54,19 @@ function createRateBar(likes, dislikes) {
|
|||||||
|
|
||||||
if (!isShorts()) {
|
if (!isShorts()) {
|
||||||
if (!rateBar && !isMobile()) {
|
if (!rateBar && !isMobile()) {
|
||||||
let colorLikeStyle = "";
|
let colorLikeStyle = " ";
|
||||||
let colorDislikeStyle = "";
|
let colorDislikeStyle = "";
|
||||||
if (extConfig.coloredBar) {
|
if (extConfig.coloredBar) {
|
||||||
colorLikeStyle = "; background-color: " + getColorFromTheme(true);
|
colorLikeStyle = "; background-color: " + getColorFromTheme(true);
|
||||||
colorDislikeStyle = "; background-color: " + getColorFromTheme(false);
|
colorDislikeStyle = "; background-color: " + getColorFromTheme(false);
|
||||||
}
|
}
|
||||||
let actions = isNewDesign() && getButtons().id === "top-level-buttons-computed"
|
let actions =
|
||||||
? getButtons() : document.getElementById("menu-container");
|
isNewDesign() && getButtons().id === "top-level-buttons-computed"
|
||||||
|
? getButtons()
|
||||||
|
: document.getElementById("menu-container");
|
||||||
(
|
(
|
||||||
actions || document.querySelector("ytm-slim-video-action-bar-renderer")
|
actions ||
|
||||||
|
document.querySelector("ytm-slim-video-action-bar-renderer")
|
||||||
).insertAdjacentHTML(
|
).insertAdjacentHTML(
|
||||||
"beforeend",
|
"beforeend",
|
||||||
`
|
`
|
||||||
@@ -83,7 +86,7 @@ function createRateBar(likes, dislikes) {
|
|||||||
<!--css-build:shady-->${tooltipInnerHTML}
|
<!--css-build:shady-->${tooltipInnerHTML}
|
||||||
</tp-yt-paper-tooltip>
|
</tp-yt-paper-tooltip>
|
||||||
</div>
|
</div>
|
||||||
`
|
`,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isNewDesign()) {
|
if (isNewDesign()) {
|
||||||
@@ -101,8 +104,7 @@ function createRateBar(likes, dislikes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
document.querySelector(`.ryd-tooltip`).style.width =
|
document.querySelector(`.ryd-tooltip`).style.width = widthPx + "px";
|
||||||
widthPx + "px";
|
|
||||||
document.getElementById("ryd-bar").style.width = widthPercent + "%";
|
document.getElementById("ryd-bar").style.width = widthPercent + "%";
|
||||||
document.querySelector("#ryd-dislike-tooltip > #tooltip").innerHTML =
|
document.querySelector("#ryd-dislike-tooltip > #tooltip").innerHTML =
|
||||||
tooltipInnerHTML;
|
tooltipInnerHTML;
|
||||||
|
|||||||
Reference in new issue
Block a user