mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-01 18:31:24 +01:00
Merge pull request #804 from mini-bomba/new-layout-fix
Fix ratiobar positioning in the new youtube design
This commit is contained in:
2 files changed
+21
-5
No files matched your search
@@ -30,12 +30,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ryd-tooltip {
|
.ryd-tooltip {
|
||||||
position: relative;
|
|
||||||
display: block;
|
display: block;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ryd-tooltip-old-design {
|
||||||
|
position: relative;
|
||||||
top: 9px;
|
top: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ryd-tooltip-new-design {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10px;
|
||||||
|
left: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
.ryd-tooltip-bar-container {
|
.ryd-tooltip-bar-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
@@ -44,3 +53,12 @@
|
|||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
top: -6px;
|
top: -6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* required to make the ratio bar visible in the new design */
|
||||||
|
ytd-menu-renderer.ytd-watch-metadata {
|
||||||
|
overflow-y: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#top-level-buttons-computed {
|
||||||
|
position: relative !important;
|
||||||
|
}
|
||||||
@@ -57,14 +57,12 @@ function createRateBar(likes, dislikes) {
|
|||||||
|
|
||||||
(
|
(
|
||||||
document.getElementById(
|
document.getElementById(
|
||||||
isNewDesign() ? "actions-inner" : "menu-container"
|
isNewDesign() ? "top-level-buttons-computed" : "menu-container"
|
||||||
) || document.querySelector("ytm-slim-video-action-bar-renderer")
|
) || document.querySelector("ytm-slim-video-action-bar-renderer")
|
||||||
).insertAdjacentHTML(
|
).insertAdjacentHTML(
|
||||||
"beforeend",
|
"beforeend",
|
||||||
`
|
`
|
||||||
<div class="ryd-tooltip" style="width: ${widthPx}px${
|
<div class="ryd-tooltip ryd-tooltip-${isNewDesign() ? "new" : "old"}-design" style="width: ${widthPx}px">
|
||||||
isNewDesign() ? "; margin-bottom: -2px" : ""
|
|
||||||
}">
|
|
||||||
<div class="ryd-tooltip-bar-container">
|
<div class="ryd-tooltip-bar-container">
|
||||||
<div
|
<div
|
||||||
id="ryd-bar-container"
|
id="ryd-bar-container"
|
||||||
|
|||||||
Reference in new issue
Block a user